Skip to content
Snippets Groups Projects
Commit 7540bcca authored by Artem Belevich's avatar Artem Belevich
Browse files

[CUDA] Added overloads for '[unsigned] long' variants of shfl builtins.

Differential Revision: https://reviews.llvm.org/D40871

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319908 91177308-0d34-0410-b5e6-96231b3b80d8
parent d4cff482
No related branches found
No related tags found
No related merge requests found
...@@ -135,6 +135,24 @@ __MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f); ...@@ -135,6 +135,24 @@ __MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f);
return static_cast<unsigned long long>(::__FnName( \ return static_cast<unsigned long long>(::__FnName( \
__mask, static_cast<unsigned long long>(__val), __offset, __width)); \ __mask, static_cast<unsigned long long>(__val), __offset, __width)); \
} \ } \
inline __device__ long __FnName(unsigned int __mask, long __val, \
int __offset, int __width = warpSize) { \
_Static_assert(sizeof(long) == sizeof(long long) || \
sizeof(long) == sizeof(int)); \
if (sizeof(long) == sizeof(long long)) { \
return static_cast<long>(::__FnName( \
__mask, static_cast<long long>(__val), __offset, __width)); \
} else if (sizeof(long) == sizeof(int)) { \
return static_cast<long>( \
::__FnName(__mask, static_cast<int>(__val), __offset, __width)); \
} \
} \
inline __device__ unsigned long __FnName(unsigned int __mask, \
unsigned long __val, int __offset, \
int __width = warpSize) { \
return static_cast<unsigned long>( \
::__FnName(__mask, static_cast<long>(__val), __offset, __width)); \
} \
inline __device__ double __FnName(unsigned int __mask, double __val, \ inline __device__ double __FnName(unsigned int __mask, double __val, \
int __offset, int __width = warpSize) { \ int __offset, int __width = warpSize) { \
long long __tmp; \ long long __tmp; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment