OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

clGetPlatformIDs() returns -1001?

Shenghong_G_Intel
134 Views
Hi,
I was just to learn about OpenCL. I follow the OpenCL Spec to learn and I use OpenCL SDK of Intel. But I am blocked by the first API I tried for OpenCL:clGetPlatformIDs().
This function will return me -1001 if the parameters are correct. What does -1001 mean?
See following code for reference:
[cpp]#include 

#pragma comment(lib,"OpenCL.lib")

int main(int argc, _TCHAR* argv[])
{
	cl_int err_code;
	cl_uint nplatforms;

	err_code = clGetPlatformIDs(0, NULL, &nplatforms);
	if (err_code != CL_SUCCESS) {
		printf( "Error:%d\n", err_code);
	}

	return 0;
}[/cpp]
By the way, where is the document to introduct about theintelocl.lib functions (I assume it is an extension of OpenCL) ?
Thanks,
Shenghong
0 Kudos
1 Reply
Evgeny_F_Intel
Employee
134 Views

Hi,
The error code values are defined in opencl.h
It look like your platform is not configured properly.
Evgeny

Reply