I know that a kernel may be launched with the triple brackets syntax:
kernel<<<NumOfBlocks, NumOfThreadsPerBlock, A, B>>> (...);
the last two parameters are optional but I’d like to know what do they refer to. B should refer to the stream where the kernel should be executed, but what about A?
This is amount of shared memory. You can pass as A number of bytes that you need in shared memory. And in kernel you should use
instead of
to get shared array with size A / sizeof(T) in your kernel.