This commit is contained in:
Blaise Tine
2021-10-19 03:07:13 -04:00
9 changed files with 172 additions and 15 deletions

View File

@@ -149,6 +149,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, 6, x0, 0(%0)" :: "r"(addr) );
}
// Return active warp's thread id
inline int vx_thread_id() {
int result;