Can I print a pointer in an OpenCL function?
I can use printf in kernel functions however I can’t find the way to print a pointer.
Is there some equivalent to the following?:
int *ptr = 5;
printf("%p \n", (void *)ptr);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What is wrong with this?
You can’t make
ptrpoint to 5. Pointers must point to memory on:The stack:
int xor
the heap:
int* ptr = new int(5)