cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

eugenek
Journeyman III

Where's cl_mem defined

I'm trying to build a simple program using ATI Stream SDK 2.3. I've included CL/cl.h. I'm  getting a bunch of errors on account of not having _cl_mem defined.

I see that cl_mem is defined as struct _cl_mem* in cl.h, but, the best I can tell, struct _cl_mem is, in fact, not defined anywhere.

Am I missing some header?

0 Likes
4 Replies
Tasp
Journeyman III

*edit* sorry read your post wrong

 

What compiler do you use?

0 Likes

The default compiler in Ubuntu 10.10: gcc 4.4.5.

Here's the exact error message:

 

kernel_interface.cpp:692: error: invalid use of incomplete type ‘struct _cl_mem’
/home/eugene/Downloads/ati-stream-sdk-v2.3-lnx64/include/CL/cl.h:45: error: forward declaration of ‘struct _cl_mem’

0 Likes

Can you compile one of the samples?

0 Likes

oh wait ... I got it. In my code I was trying to do arithmetic with device pointers. (This was originally a CUDA program, I'm trying to port it to AMD.) In CUDA, I can legally do "p+x" where p is a device pointer and x is an integer. In OpenCL it apparently blows up.

0 Likes