Skip to content

Commit 7e00bf8

Browse files
committed
Remove redundant pointer type
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 63232c9 commit 7e00bf8

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

sycl/include/CL/sycl/detail/pi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ piextQueueGetNativeHandle(pi_queue queue, pi_native_handle *nativeHandle);
11651165
/// should take ownership of the native handle.
11661166
/// \param queue is the PI queue created from the native handle.
11671167
__SYCL_EXPORT pi_result piextQueueCreateWithNativeHandle(
1168-
pi_native_handle nativeHandle, pi_context context, pi_device *device,
1168+
pi_native_handle nativeHandle, pi_context context, pi_device device,
11691169
bool pluginOwnsNativeHandle, pi_queue *queue);
11701170

11711171
//

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,8 +2373,7 @@ pi_result cuda_piextQueueGetNativeHandle(pi_queue queue,
23732373
///
23742374
/// \return TBD
23752375
pi_result cuda_piextQueueCreateWithNativeHandle(pi_native_handle, pi_context,
2376-
pi_device *,
2377-
bool ownNativeHandle,
2376+
pi_device, bool ownNativeHandle,
23782377
pi_queue *) {
23792378
(void)ownNativeHandle;
23802379
cl::sycl::detail::pi::die(

sycl/plugins/esimd_emulator/pi_esimd_emulator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ pi_result piextQueueGetNativeHandle(pi_queue, pi_native_handle *) {
10001000
}
10011001

10021002
pi_result piextQueueCreateWithNativeHandle(pi_native_handle, pi_context,
1003-
pi_device *, bool, pi_queue *) {
1003+
pi_device, bool, pi_queue *) {
10041004
DIE_NO_IMPLEMENTATION;
10051005
}
10061006

sycl/plugins/hip/pi_hip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ pi_result hip_piextQueueGetNativeHandle(pi_queue queue,
23102310
/// \return TBD
23112311
pi_result hip_piextQueueCreateWithNativeHandle(pi_native_handle nativeHandle,
23122312
pi_context context,
2313-
pi_device *device,
2313+
pi_device device,
23142314
bool ownNativeHandle,
23152315
pi_queue *queue) {
23162316
(void)nativeHandle;

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,7 +3448,7 @@ pi_result piextQueueGetNativeHandle(pi_queue Queue,
34483448

34493449
pi_result piextQueueCreateWithNativeHandle(pi_native_handle NativeHandle,
34503450
pi_context Context,
3451-
pi_device *DevicePtr,
3451+
pi_device Device,
34523452
bool OwnNativeHandle,
34533453
pi_queue *Queue) {
34543454
PI_ASSERT(Context, PI_INVALID_CONTEXT);
@@ -3461,8 +3461,9 @@ pi_result piextQueueCreateWithNativeHandle(pi_native_handle NativeHandle,
34613461

34623462
// For compatibility with older implementations we allow the device to be
34633463
// optional for now. Once the deprecated interop API is removed this can be
3464-
// changed to an assert(DevicePtr).
3465-
pi_device Device = DevicePtr ? *DevicePtr : Context->Devices[0];
3464+
// changed to an assert(Device).
3465+
if (!Device)
3466+
Device = Context->Devices[0];
34663467
// TODO: see what we can do to correctly initialize PI queue for
34673468
// compute vs. copy Level-Zero queue. Currently we will send
34683469
// all commands to the "ZeQueue".

sycl/plugins/opencl/pi_opencl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ pi_result piQueueCreate(pi_context context, pi_device device,
431431
}
432432

433433
pi_result piextQueueCreateWithNativeHandle(pi_native_handle nativeHandle,
434-
pi_context, pi_device *,
434+
pi_context, pi_device,
435435
bool ownNativeHandle,
436436
pi_queue *piQueue) {
437437
(void)ownNativeHandle;

sycl/source/backend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ __SYCL_EXPORT context make_context(pi_native_handle NativeHandle,
7878
}
7979

8080
queue make_queue_impl(pi_native_handle NativeHandle, const context &Context,
81-
RT::PiDevice *Device, bool KeepOwnership,
81+
RT::PiDevice Device, bool KeepOwnership,
8282
const async_handler &Handler, backend Backend) {
8383
const auto &Plugin = getPlugin(Backend);
8484
const auto &ContextImpl = getSyclObjImpl(Context);
@@ -111,7 +111,7 @@ __SYCL_EXPORT queue make_queue(pi_native_handle NativeHandle,
111111
bool KeepOwnership, const async_handler &Handler,
112112
backend Backend) {
113113
const auto &DeviceImpl = getSyclObjImpl(Device);
114-
return make_queue_impl(NativeHandle, Context, &DeviceImpl->getHandleRef(),
114+
return make_queue_impl(NativeHandle, Context, DeviceImpl->getHandleRef(),
115115
KeepOwnership, Handler, Backend);
116116
}
117117

0 commit comments

Comments
 (0)