vortex tutorial assignment 5 solution

This commit is contained in:
Santosh Raghav Srivatsan
2021-10-15 18:25:54 -04:00
parent e2b5799a01
commit dd12d3f848
8 changed files with 41 additions and 14 deletions

View File

@@ -84,6 +84,11 @@ inline void vx_barrier(unsigned barried_id, unsigned num_warps) {
asm volatile (".insn s 0x6b, 4, %1, 0(%0)" :: "r"(barried_id), "r"(num_warps));
}
// Prefetch
inline void vx_prefetch(unsigned addr) {
asm volatile (".insn s 0x6b, 5, x0, 0(%0)" :: "r"(addr) );
}
// Return active warp's thread id
inline int vx_thread_id() {
int result;