The __shared__
memory in CUDA seems to require a known size at compile time. However, in my problem, the __shared__
memory size is only know at run time, i.e.
int size=get_size();
__shared__ mem[size];
This will end up with "error: constant value is not known", and I'm not sure how to get around this problem.