I have a global array:
device unsigned int d_array;
I want to copy the value from one single array element to host memory, in host code. Is this possible?
I can call CudaGetSymbolAddress() to get the address of symbol d_array, but can I do any indexing or pointer arithmetic before calling CudaMemcpy(…, cudaMemcpyDeviceToHost) in order to copy a single array element?
I have had trouble doing this. Is the way to do this to copy the entire array rather than trying to copy elements of the array?