I am trying to minimize the required shared memory. Is there a way to let compiler know when allocated shared memory can be recalimed by another shared memory request?
For an example, within the same block, I have allocated 1 KB of shared memory. The shared memory is only used for the first half of the kernel. Once the shared memory is no longer used, if I allocate 0.5KB of shared memory again, then would it automatically reclaim the shared memory that was initially allocated? IF not, is there a manual way to let the compiler know that I am no longer going to use the region of shared memory, and it is safe to be reclaimed?