Cache
On this Page
Cache¶
Aso¶
Represents ASO instruction - Used to establish memory consistency between vector loads and vector stores.
Intrinsics Prototype and Arguments
void aso(int switches=0, bool predicate=1, bool polarity=0) |
switches |
Switches of ASO instructions. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
SW_INC - Increment the semaphore value once all older writes to memory are observable.
SW_DEC - Decrement the semaphore value once all older writes to memory are observable.
SW_SPU - Semaphore update is done in SPU stage.
SW_VPU - Semaphore update is done in VPU stage.
Cache Flush¶
Represents CACHE_FLUSH instruction - Flush the Data-cache. This instruction also invalidates the caceh after flush.
Intrinsics Prototype and Arguments
void cache_flush(int switches=0, bool predicate=1, bool polarity=0) |
switches |
Switches of the instructions. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Cache Invalidate¶
Represents CACHE_INVALIDATE instruction - Invalidate Data/LUT/SB cache. This instruction does not flush out the data cache.
Intrinsics Prototype and Arguments
void cache_invalidate(int switches=0, bool predicate=1, bool polarity=0) |
switches |
Switches of the instructions. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Prefetch¶
Represents PREFETCH instruction. Prefetch data from global memory to scalar cache.
Intrinsics Prototype and Arguments
void prefetch(__global void *a, int switches=0, bool predicate=1, bool polarity=0) |
a |
Address to prefetch (SRC1). |
switches |
Switches of the instruction. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Get semaphore value¶
Return semaphore value.
Intrinsics Prototype and Arguments
int32_t get_semaphore_value() |
Semaphore value.
Set semaphore value¶
Set semaphore value.
Intrinsics Prototype and Arguments
void set_semaphore_value(int32_t val) |
val |
The new padding value. |