CUDA kernel compilation fixes
parent
03760f80eb
commit
f349731d54
|
@ -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];
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue