Skip to content

Commit

Permalink
opencl: Fix type of parameter for clGetProgramInfo
Browse files Browse the repository at this point in the history
CL_PROGRAM_NUM_DEVICES expects a cl_uint.

Passing size_t results in a wrong value for numDevices on hosts where
sizeof(cl_uint) != sizeof(size_t).

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Nov 12, 2016
1 parent ec5b1bd commit 4ca6ba9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opencl/openclwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ int OpenclDevice::GeneratBinFromKernelSource( cl_program program, const char * c
{
unsigned int i = 0;
cl_int clStatus;
size_t *binarySizes, numDevices=0;
size_t *binarySizes;
cl_uint numDevices;
cl_device_id *mpArryDevsID;
char **binaries, *str = NULL;

Expand Down

0 comments on commit 4ca6ba9

Please sign in to comment.