how to copy 64 bit integer from host to device in cuda?
I need to copy 64 bit integer data from host to device memory.
Both of them are declared asunsigned __int64
and i used cudaMemcpyToSymbol()
.
By checking with Parallel Nsight, the copied data is shown as a negative integ开发者_开发知识库er.
I guess the most significant bit of the lower 4 bytes is treated as a sign bit which is not supposed to be.
Can anybody give me any direction to come up with this?Oh, I found the reason.
Though every 64-bit data manipulation works fine, Parallel Nsight does not recognize any 64 bit integer.
It was Nsight problem. It really sucks.
This incomplete debugger made me waste time.
精彩评论