cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

spectral
Adept II

Add method to structs ? ... like a class ...

Hi,

I would like to know if it is possible to a method to structs ? Like for a class ?

Or if there are some 'mechanism/tips/tricks' that can help to acheive this ?

0 Likes
1 Reply
himanshu_gautam
Grandmaster

hi,

AFAIK you cannot use methods in C structures without a function pointer.

As OpenCL is based on C99 and function pointers are not supported

in OpenCL,I think its impossible to have methods in opencl Structures.

Refer OpenCL spec for details

0 Likes