Hi,
in a kernel i read a pointer (int*) from memory, like:
int* ptr = str->val_ptr;
The kernel does not know that the pointer points to device memory.
How can i tell that to the kernel?
I pass that pointer within a struct (i have another post regardig this issue, but i think it is not too clearly described).
When compiling i get the message:
Warning: Cannot tell what pointer points to, assuming global memory space
It seems i can’t add the attribute device, neither in the code in the kernel, nor in the definition in the struct.
I allocated the memory that the pointer points to using cudaMalloc(&str->valptr, size)
str is a struct that contains a member:
int* valptr;
I’m not sure, i must be completely missing something, there must be a way to tell what the pointer points to? That must be a standard problem, right?
Thanks for any hints,
Torsten.