CUDA kernel compilation fixes

pull/204/head
Cedric Nugteren 2017-10-17 19:53:09 +02:00
parent 03760f80eb
commit f349731d54
2 changed files with 6 additions and 1 deletions

View File

@ -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];

View File

@ -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; }