cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sajis997
Adept I

native kernel - example

Hi folks,

I am sure if i missed it or not, i have not found any examples of native kernels so far in any book.

Can any one point me to any ?

How they differ between OpenCL kernels and native kernels .

I think i get the OpenCL kernels where the opencl program object encapsulate the kernels as string literals.

Anymore thoughts ?

Regards

Sajjadul

0 Likes
3 Replies
nou
Exemplar

native kernels are just C function which are called by OpenCL.

Is this the same way we call to the cuda kernel execution as the extern c function ?

0 Likes

I dont know about CUDA and Extern C stuff...

but, native kernel just converts all buffer args onto native host-accessible pointers and will transfer control to the "user_func" argument. This "user_func" is just a normal C function that can do anything (may be, call another OpenCL function??? I dont know if another OpenCL call will work (or) if it will deadlock the OpenCL RT... 🙂 )

0 Likes