data access in kernels how to access data of one kernel in another kernel


How to make the data - which is transferred from host program to GPU (using cudaMemcpy function) memory- to be accessed in different cuda kernel calls at different intervals of program execution.

Is it possible?


You can make two calls.


Assuming - dout is an array of integers.

kernel01<<<>>>(din,dout) - In this cuda kernel definition, if some operation performed on dout array inside CUDA and values are modified, then in the next kernel call:

kernel02<<<>>>(dout, dmoret) - will it continue to take the modified values or will it take a original values.


Modified ones.