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

PrefetchRW

struct PrefetchRW

Prefetch read or write.

Fields​

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

Implemented traits​

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

comptime members​

READ​

comptime READ = PrefetchRW(Int(0))

Read prefetch.

WRITE​

comptime WRITE = PrefetchRW(Int(1))

Write prefetch.

Methods​

__init__​

def __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__​

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