clGetPlatformIDs() returns -1001?

clGetPlatformIDs() returns -1001?

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:


#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:%dn", err_code);

	return 0;

By the way, where is the document to introduct about theintelocl.lib functions (I assume it is an extension of OpenCL) ?Thanks,Shenghong

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today