diff --git a/src/kernels/level2/level2.opencl b/src/kernels/level2/level2.opencl index 505231ca..ff46c2a5 100644 --- a/src/kernels/level2/level2.opencl +++ b/src/kernels/level2/level2.opencl @@ -34,7 +34,7 @@ R"( // Returns an element from a vector INLINE_FUNC real LoadVector(const int id, const int max, - __global real* gm, const int offset, const int inc, + const __global real* gm, const int offset, const int inc, const int do_conjugate) { if (id < max) { real result = gm[id*inc + offset]; 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; }