@@ -176,7 +176,7 @@ pi_result OCL(piPlatformsGet)(pi_uint32 num_entries, pi_platform *platforms,
176176 return static_cast <pi_result>(result);
177177}
178178
179- pi_result OCL (piextDeviceInterop )(pi_device *device, void **handle) {
179+ pi_result OCL (piextDeviceConvert )(pi_device *device, void **handle) {
180180 // The PI device is the same as OpenCL device handle.
181181 assert (device);
182182 assert (handle);
@@ -190,8 +190,8 @@ pi_result OCL(piextDeviceInterop)(pi_device *device, void **handle) {
190190 *handle = *device;
191191 }
192192
193- clRetainDevice (cast<cl_device_id>(*handle));
194- return PI_SUCCESS ;
193+ cl_int result = clRetainDevice (cast<cl_device_id>(*handle));
194+ return cast<pi_result>(result) ;
195195}
196196
197197// Example of a PI interface that does not map exactly to an OpenCL one.
@@ -323,7 +323,7 @@ pi_result OCL(piQueueCreate)(pi_context context, pi_device device,
323323 return cast<pi_result>(ret_err);
324324}
325325
326- pi_result OCL (piextProgramInterop )(
326+ pi_result OCL (piextProgramConvert )(
327327 pi_context context, // /< [in] the PI context of the program
328328 pi_program *program, // /< [in,out] the pointer to PI program
329329 void **handle) // /< [in,out] the pointer to the raw program handle
@@ -340,8 +340,8 @@ pi_result OCL(piextProgramInterop)(
340340 assert (*handle == nullptr );
341341 *handle = *program;
342342 }
343- clRetainProgram (cast<cl_program>(*handle));
344- return PI_SUCCESS ;
343+ cl_int result = clRetainProgram (cast<cl_program>(*handle));
344+ return cast<pi_result>(result) ;
345345}
346346
347347pi_result OCL (piProgramCreate)(pi_context context, const void *il,
@@ -1031,7 +1031,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
10311031 _PI_CL (piPlatformsGet, OCL (piPlatformsGet))
10321032 _PI_CL (piPlatformGetInfo, clGetPlatformInfo)
10331033 // Device
1034- _PI_CL (piextDeviceInterop , OCL (piextDeviceInterop ))
1034+ _PI_CL (piextDeviceConvert , OCL (piextDeviceConvert ))
10351035 _PI_CL (piDevicesGet, OCL (piDevicesGet))
10361036 _PI_CL (piDeviceGetInfo, clGetDeviceInfo)
10371037 _PI_CL (piDevicePartition, clCreateSubDevices)
@@ -1059,7 +1059,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
10591059 _PI_CL (piMemRelease, clReleaseMemObject)
10601060 _PI_CL (piMemBufferPartition, OCL (piMemBufferPartition))
10611061 // Program
1062- _PI_CL (piextProgramInterop , OCL (piextProgramInterop ))
1062+ _PI_CL (piextProgramConvert , OCL (piextProgramConvert ))
10631063 _PI_CL (piProgramCreate, OCL (piProgramCreate))
10641064 _PI_CL (piclProgramCreateWithSource, OCL (piclProgramCreateWithSource))
10651065 _PI_CL (piclProgramCreateWithBinary, OCL (piclProgramCreateWithBinary))
0 commit comments