I am aware of the dynamic allocation for 1D arrays, but how can it be done for 2D arrays?
myKernel<<<blocks, threads,sizeofSharedMemoryinBytes>>>();
....
__global__ void myKernel(){
__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 it be:
myKernel<<< blocks, threads, sizeof(float)*32*32 >>>();