thread mask redesign

This commit is contained in:
Blaise Tine
2021-08-05 17:32:58 -07:00
parent 7b8fe11e6a
commit e4d9fd8a00
14 changed files with 68 additions and 28 deletions

View File

@@ -121,6 +121,13 @@ inline int vx_core_id() {
return result;
}
// Return current threadk mask
inline int vx_thread_mask() {
int result;
asm volatile ("csrr %0, %1" : "=r"(result) : "i"(CSR_TMASK));
return result;
}
// Return the number of threads in a warp
inline int vx_num_threads() {
int result;