diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-17 19:53:09 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-17 19:53:09 +0200 |
commit | f349731d5498f484995514112551c1b60ca4f6d3 (patch) | |
tree | 1b038e62f42d80a3d60a8b545a25c25d5b8c5d50 /src/kernels/opencl_to_cuda.h | |
parent | 03760f80eb7eb07450da379d129ba64d92bfcc41 (diff) |
CUDA kernel compilation fixes
Diffstat (limited to 'src/kernels/opencl_to_cuda.h')
-rw-r--r-- | src/kernels/opencl_to_cuda.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernels/opencl_to_cuda.h b/src/kernels/opencl_to_cuda.h index e8206764..5682a456 100644 --- a/src/kernels/opencl_to_cuda.h +++ b/src/kernels/opencl_to_cuda.h @@ -31,6 +31,11 @@ __device__ int get_group_id(const int x) { if (x == 1) { return blockIdx.y; } return blockIdx.z; } +__device__ int get_local_size(const int x) { + if (x == 0) { return blockDim.x; } + if (x == 1) { return blockDim.y; } + return blockDim.z; +} __device__ int get_num_groups(const int x) { if (x == 0) { return gridDim.x; } if (x == 1) { return gridDim.y; } |