- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
void CL_CALLBACK myCallback( cl_event event,cl_int cmd_exec_status, void *user_data)
is giving an error on compilation.
Also, clSetEventCallback() statement is giving an error 'clSetEventCallback' identifier not found.
Does this mean that Intel SDK does not support callback functions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel SDK does support callback functions.
Can you provide more details on the problem?
Which development environment are you using?
Problematic code sample?
Thanks,
Evgeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the delayed reply.
Environment:
OS: Windows
CPU: Intel Core 2 Duo
Sample Code:
#include
#include
#include "cl.h"
void CL_CALLBACK myCallback(cl_event evnt,cl_int cmd_sts,void *user_data);
int main(int argc, char** argv)
{
/* Find platform and devices
Create Context, Command queue, program andkernel.
Set arguments to the kernel
*/
ret = clEnqueueNDRangeKernel(cqCommandQueue, ckKernel, 1, NULL, &global_item_size, &local_item_size, 0, NULL, &event1);
ret = clSetEventCallback(event1, CL_COMPLETE, &myCallback, NULL);
/* Read result from buffer
Release resources.
*/
}
void myCallback(cl_event evnt,cl_int cmd_sts,void *user_data)
{
/* Do something */
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check location of the cl.h.
Is it coming from Intel SDK?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just noticed that I had 2 cl.h files.
I did not check if they were different because i assumed, no matter what the .h files would be the same.
Thanks once again.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page