Fix hip_ballot.cpp compilation on hcc

[ROCm/hip commit: ba6393e36d]
这个提交包含在:
Maneesh Gupta 于 2016-03-03 09:52:41 +05:30 提交
1 父节点 69132a5a5b
当前提交 b3d6a32b62
1 个文件已更改
+5 -2
+5 -2
查看文件
@@ -9,8 +9,11 @@ __global__ void
int tid = hipThreadIdx_x + hipBlockIdx_x * hipBlockDim_x;
const unsigned int warp_num = hipThreadIdx_x >> pshift;
if (pshift ==6) {atomicAdd(&device_ballot[warp_num+hipBlockIdx_x*Num_Warps_per_Block],__popcll(__ballot(tid - 245)));}
else {atomicAdd(&device_ballot[warp_num+hipBlockIdx_x*Num_Warps_per_Block],__popc(__ballot(tid - 245)));}
#ifdef __HIP_PLATFORM_HCC__
atomicAdd(&device_ballot[warp_num+hipBlockIdx_x*Num_Warps_per_Block],__popcll(__ballot(tid - 245)));
#else
atomicAdd(&device_ballot[warp_num+hipBlockIdx_x*Num_Warps_per_Block],__popc(__ballot(tid - 245)));
#endif
}