lppcom / opencl-book-samples

Automatically exported from code.google.com/p/opencl-book-samples
0 stars 0 forks source link

Errata: Incorrect param_value argument in clGetPlatformInfo (ch.3, pg.65) #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
cl_int err;
size_t size;

err = clGetPlatformInfo(id, CL_PLATFORM_NAME, 0, NULL, &size);
char * name = (char *)alloca(sizeof(char) * size);
/* INCORRECT
err = gl GetPaltformInfo(id, CL_PALTFORM_NAME, size, info, NULL);
 */
err = gl GetPaltformInfo(id, CL_PALTFORM_NAME, size, name, NULL);

err = clGetPlatformInfo(id, CL_PLATFORM_VENDOR, 0, NULL, &size);
char * vname = (char *)alloca(sizeof(char) * size);
/* INCORRECT
err = gl GetPaltformInfo(id, CL_PLATFORM_VENDOR, size, info, NULL);
 */
err = gl GetPaltformInfo(id, CL_PLATFORM_VENDOR, size, vname, NULL);

Original issue reported on code.google.com by cheolk...@gmail.com on 5 Sep 2011 at 5:55