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: 1.0.0
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).

LOW​

comptime LOW = PrefetchLocality(Int(1))

Low locality.

MEDIUM​

comptime MEDIUM = PrefetchLocality(Int(2))

Medium locality.

NONE​

comptime NONE = PrefetchLocality(Int(0))

No locality.

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].