mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Fix types passed to sizeof operator in clGetProgramInfo()
CL_PROGRAM_BINARY_SIZES parameter uses size_t according to the specification. Replaced usage of cl_device_id with size_t. Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
ec3668fc18
commit
f6bcdfafaa
@ -44,7 +44,7 @@ cl_int Program::getInfo(cl_program_info paramName, size_t paramValueSize,
|
||||
break;
|
||||
|
||||
case CL_PROGRAM_BINARIES: {
|
||||
auto requiredSize = clDevices.size() * sizeof(const unsigned char **);
|
||||
auto requiredSize = clDevices.size() * sizeof(unsigned char *);
|
||||
if (!paramValue) {
|
||||
retSize = requiredSize;
|
||||
srcSize = 0u;
|
||||
@ -75,7 +75,7 @@ cl_int Program::getInfo(cl_program_info paramName, size_t paramValueSize,
|
||||
}
|
||||
|
||||
pSrc = binarySizes.data();
|
||||
retSize = srcSize = binarySizes.size() * sizeof(cl_device_id);
|
||||
retSize = srcSize = binarySizes.size() * sizeof(size_t);
|
||||
break;
|
||||
|
||||
case CL_PROGRAM_KERNEL_NAMES:
|
||||
|
Reference in New Issue
Block a user