Skip to main content

Mojo struct

PrefetchLocality

@register_passable(trivial) 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, ImplicitlyCopyable, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

HIGH

comptime HIGH = PrefetchLocality(3)

Extremely local locality (keep in cache).

LOW

comptime LOW = PrefetchLocality(1)

Low locality.

MEDIUM

comptime MEDIUM = PrefetchLocality(2)

Medium locality.

NONE

comptime NONE = PrefetchLocality(0)

No locality.

Methods

__init__

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

Was this page helpful?