Skip to main content

Mojo struct

AccessProperty

struct AccessProperty

Specifies performance hint with AccessPolicyWindow for hit_prop and miss_prop fields.

This struct defines cache persistence properties that can be used with AccessPolicyWindow to control how data is cached during GPU memory accesses. It provides hints to the memory subsystem about the expected access patterns, which can improve performance for specific workloads.

Implemented traits

AnyType, Copyable, Equatable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members

NORMAL

comptime NORMAL = AccessProperty(SIMD(0))

Normal cache persistence with default caching behavior.

PERSISTING

comptime PERSISTING = AccessProperty(SIMD(2))

Persisting access is more likely to persist in cache, optimized for reused data.

STREAMING

comptime STREAMING = AccessProperty(SIMD(1))

Streaming access is less likely to persist in cache, optimized for single-use data.

Methods

__eq__

__eq__(self, other: Self) -> Bool

Compares two AccessProperty instances for equality.

Args:

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

Returns:

Bool: True if the instances have the same value, False otherwise.

__ne__

__ne__(self, other: Self) -> Bool

Compares two AccessProperty instances for inequality.

Args:

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

Returns:

Bool: True if the instances have different values, False otherwise.

write_to

write_to(self, mut writer: T)

Writes a string representation of the AccessProperty to a writer.

Args:

  • writer (T): The writer instance to write the formatted string to.

Was this page helpful?