summaryrefslogtreecommitdiff
path: root/prelude
diff options
context:
space:
mode:
Diffstat (limited to 'prelude')
-rw-r--r--prelude/slang-cuda-prelude.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/prelude/slang-cuda-prelude.h b/prelude/slang-cuda-prelude.h
index 1ca93d9d1..ce8e925a2 100644
--- a/prelude/slang-cuda-prelude.h
+++ b/prelude/slang-cuda-prelude.h
@@ -441,6 +441,12 @@ __forceinline__ __device__ uint32_t _getLaneId()
}
#endif
+// Return mask of all the lanes less than the current lane
+__forceinline__ __device__ int _getLaneLtMask()
+{
+ return (int(1) << _getLaneId()) - 1;
+}
+
// Note! Note will return true if mask is 0, but thats okay, because there must be one
// lane active to execute anything
__inline__ __device__ bool _waveIsSingleLane(int mask)