@@ -176,7 +176,7 @@ pi_result OCL(piPlatformsGet)(pi_uint32 num_entries, pi_platform *platforms,
176
176
return static_cast <pi_result>(result);
177
177
}
178
178
179
- pi_result OCL (piextDeviceInterop )(pi_device *device, void **handle) {
179
+ pi_result OCL (piextDeviceConvert )(pi_device *device, void **handle) {
180
180
// The PI device is the same as OpenCL device handle.
181
181
assert (device);
182
182
assert (handle);
@@ -190,8 +190,8 @@ pi_result OCL(piextDeviceInterop)(pi_device *device, void **handle) {
190
190
*handle = *device;
191
191
}
192
192
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) ;
195
195
}
196
196
197
197
// 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,
323
323
return cast<pi_result>(ret_err);
324
324
}
325
325
326
- pi_result OCL (piextProgramInterop )(
326
+ pi_result OCL (piextProgramConvert )(
327
327
pi_context context, // /< [in] the PI context of the program
328
328
pi_program *program, // /< [in,out] the pointer to PI program
329
329
void **handle) // /< [in,out] the pointer to the raw program handle
@@ -340,8 +340,8 @@ pi_result OCL(piextProgramInterop)(
340
340
assert (*handle == nullptr );
341
341
*handle = *program;
342
342
}
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) ;
345
345
}
346
346
347
347
pi_result OCL (piProgramCreate)(pi_context context, const void *il,
@@ -1031,7 +1031,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
1031
1031
_PI_CL (piPlatformsGet, OCL (piPlatformsGet))
1032
1032
_PI_CL (piPlatformGetInfo, clGetPlatformInfo)
1033
1033
// Device
1034
- _PI_CL (piextDeviceInterop , OCL (piextDeviceInterop ))
1034
+ _PI_CL (piextDeviceConvert , OCL (piextDeviceConvert ))
1035
1035
_PI_CL (piDevicesGet, OCL (piDevicesGet))
1036
1036
_PI_CL (piDeviceGetInfo, clGetDeviceInfo)
1037
1037
_PI_CL (piDevicePartition, clCreateSubDevices)
@@ -1059,7 +1059,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
1059
1059
_PI_CL (piMemRelease, clReleaseMemObject)
1060
1060
_PI_CL (piMemBufferPartition, OCL (piMemBufferPartition))
1061
1061
// Program
1062
- _PI_CL (piextProgramInterop , OCL (piextProgramInterop ))
1062
+ _PI_CL (piextProgramConvert , OCL (piextProgramConvert ))
1063
1063
_PI_CL (piProgramCreate, OCL (piProgramCreate))
1064
1064
_PI_CL (piclProgramCreateWithSource, OCL (piclProgramCreateWithSource))
1065
1065
_PI_CL (piclProgramCreateWithBinary, OCL (piclProgramCreateWithBinary))
0 commit comments