- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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?
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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 */
}
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Please check location of the cl.h.
Is it coming from Intel SDK?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
