I have a doubt about the shared variables in kernel. Assuming I launch the same kernel several times like this:
if (index>i && index<n){
K<<<1,n>>>(i, n, n);
}
If I declare inside kernel "K" a extern __shared__
variable like this:
__global__ K(int i, int n){
...
extern __shared__ int test[];
...
}
Do the all threads of all kernels inside block can be access it? Or the shared variable is exclusive to a kernel?