IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

PrefetchLocality

struct PrefetchLocality

The prefetch locality.

The locality, rw, and cache type correspond to LLVM prefetch intrinsic's inputs (see LLVM prefetch locality)

Fields​

  • ​value (Int32): The prefetch locality to use. It should be a value in [0, 3].

Implemented traits​

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

high​

comptime high = PrefetchLocality(Int(3))

Extremely local locality (keep in cache).

HIGH​

comptime HIGH = PrefetchLocality.high

Deprecated: The former name of high.

Deprecated: 'HIGH' is deprecated, use 'high' instead

low​

comptime low = PrefetchLocality(Int(1))

Low locality.

LOW​

comptime LOW = PrefetchLocality.low

Deprecated: The former name of low.

Deprecated: 'LOW' is deprecated, use 'low' instead

medium​

comptime medium = PrefetchLocality(Int(2))

Medium locality.

MEDIUM​

comptime MEDIUM = PrefetchLocality.medium

Deprecated: The former name of medium.

Deprecated: 'MEDIUM' is deprecated, use 'medium' instead

none​

comptime none = PrefetchLocality(Int(0))

No locality.

NONE​

comptime NONE = PrefetchLocality.none

Deprecated: The former name of none.

Deprecated: 'NONE' is deprecated, use 'none' instead

Methods​

__init__​

def __init__(value: Int) -> Self

Constructs a prefetch locality option.

Args:

  • ​value (Int): An integer value representing the locality. Should be a value in the range [0, 3].