Skip to main content

Mojo struct

PrefetchRW

@register_passable(trivial) struct PrefetchRW

Prefetch read or write.

Fields

  • value (Int32): The read-write prefetch. It should be in [0, 1].

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

READ

comptime READ = PrefetchRW(0)

Read prefetch.

WRITE

comptime WRITE = PrefetchRW(1)

Write prefetch.

Methods

__init__

__init__(value: Int) -> Self

Constructs a prefetch read-write option.

Args:

  • value (Int): An integer value representing the prefetch read-write option to be used. Should be a value in the range [0, 1].

__eq__

__eq__(self, other: Self) -> Bool

Checks if two prefetch read-write options are equal.

Args:

  • other (Self): The option to compare with.

Returns:

Bool: True if the two prefetch read-write options are equal and False otherwise.

Was this page helpful?