sharing variables

Hi

I just learning to use cuda

could some one quickly tell me how can i share variables between gpu and cpu.

for Instance I want to calculate the result of a operation using the GPU but I want to transfer it to cpu so that i can do a printf

thanks

cudaMemcpy and related functions. It’s all in the programming guide.

thank you…thats what i was looking for