Skip to main content
Log in

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 (SIMD[int32, 1]): The prefetch locality to use. It should be a value in [0, 3].

Implemented traits

AnyType, Copyable, Movable, UnknownDestructibility

Aliases

HIGH

alias HIGH = PrefetchLocality(3)

Extremely local locality (keep in cache).

LOW

alias LOW = PrefetchLocality(1)

Low locality.

MEDIUM

alias MEDIUM = PrefetchLocality(2)

Medium locality.

NONE

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