Accessing data from another kernel


I have a kernel F1 which puts some data in an array A_d on the device memory. I have another kernel F2 which is executed after F1. My question is: is it possible to access and modify the array A_d from within F2?



If A_d is allocated in global memory and the same pointer is passed to both kernels as an argument, then the answer is yes, of course. CUDA would be ridiculously limited if that weren’t the case.

Thank you so much for your quick reply!! :-)