0
考虑以下主机功能:CUDA指针reintepret_cast的行为?
uint64_t * SomeDevPtr =...
/* Where SomeDevPtr is a pointer pointed to some device memory address allocated by cudaMalloc(); */
uint32_t * SomeDevIntPtr = reintepret_cast<uint32_t *>(SomeDevPtr);
因为函数的,cudaMalloc
将automatcially fullfill一些aligment要求(我认为它被对准以某些128字节存储器边界),因此,我认为既SomeDevIntPtr
和SomeDevPtr
应该从GPU全局内存中的相同物理内存地址开始,我对此是否正确?
我只是想确定一下,因为我写的一些函数依赖于它。