Hello everyone,
I would like to allocate an array in the shared memory in my cuda kernel. What I would like to do is something along the lines:
[codebox]
const int dims = blockIdx.x * blockDim.x;
shared int myArray [blockIdx.x * blockDim.x];
[/codebox]
However, this fails with “Constant value is not known”. I guess it is expecting a constant compile time known value. Is there a way to get past this? I am trying to reduce registers usage in my kernel by allocating things as much as possible into the shared memory.
Thanks,
/x