pub const PrefetchOptions = struct rw: Rw = .readWhether the prefetch should prepare for a read or a write.
locality: u2 = 3The data's locality in an inclusive range from 0 to 3.
0 means no temporal locality. That is, the data can be immediately dropped from the cache after it is accessed.
3 means high temporal locality. That is, the data should be kept in the cache as it is likely to be accessed again soon.
cache: Cache = .dataThe cache that the prefetch should be performed on.
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199pub const PrefetchOptions = struct {
/// Whether the prefetch should prepare for a read or a write.
rw: Rw = .read,
/// The data's locality in an inclusive range from 0 to 3.
///
/// 0 means no temporal locality. That is, the data can be immediately
/// dropped from the cache after it is accessed.
///
/// 3 means high temporal locality. That is, the data should be kept in
/// the cache as it is likely to be accessed again soon.
locality: u2 = 3,
/// The cache that the prefetch should be performed on.
cache: Cache = .data,
pub const Rw = enum(u1) {
read,
write,
};
pub const Cache = enum(u1) {
instruction,
data,
};
}
This data structure is used by the Zig language code generation and therefore must be kept in sync with the compiler implementation.