I am aware of the dynamic allocation when 1D arrays are used, but how can it be done when 2D arrays are used?
myKernel<<<blocks, threads,sizeofSharedMemoryinBytes>>>();
....
__global__ void myKernerl(){
__shared__ float sData[][];
.....
}
Say I want to allocate a 2D shared memory array:
__shared__ float sData[32][32];
How can it be done dynamically? would be:
myKernel<<< blocks, threads, sizeof(float)*32*32 >>>();