cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

barno
Journeyman III

How to create a NULL pointer in OpenCL?

When writing

some_pointer = NULL

I get the following error:

error: identifier "NULL" is undefined

 

How do I create a NULL pointer in OpenCL?

0 Likes
2 Replies
LeeHowes
Staff

some_pointer = 0; ?

As I understand that's more standard these days anyway rather than hiding 0 with NULL. Maybe that's a C++ thing, though.

0 Likes

Great, thanks. That's how I did it anyways, just wanted to make sure I'm doing it the proper way.

0 Likes