How to copy a 64 bit integer from host to device in cuda?

I need to copy 64-bit integer data from the host to the device memory.
Both of them are declared as unsigned __int64, and I used cudaMemcpyToSymbol().
When validated using Parallel Nsight, the copied data is displayed as a negative integer. I think the most significant bit of the lower 4 bytes is considered as a sign bit, which should not be.
Can someone give me any direction to come up with this?

+3
source share
1 answer

Oh, I found a reason.
Although every 64-bit data processing works fine, Parallel Nsight does not recognize any 64-bit integer.
This was an Nsight problem. It really sucks.
This incomplete debugger made me waste time.

+3
source

Source: https://habr.com/ru/post/1765094/


All Articles