Skip to content

Commit e3be22a

Browse files
committed
clang format
1 parent d003083 commit e3be22a

22 files changed

+81
-88
lines changed

sycl/source/detail/async_alloc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void *async_malloc(sycl::handler &h, sycl::usm::alloc kind, size_t size) {
8585
} else {
8686
ur_queue_handle_t Q = h.impl->get_queue().getHandleRef();
8787
Adapter.call<sycl::errc::runtime,
88-
sycl::detail::UrApiKind::urEnqueueUSMDeviceAllocExp>(
88+
sycl::detail::UrApiKind::urEnqueueUSMDeviceAllocExp>(
8989
Q, (ur_usm_pool_handle_t)0, size, nullptr, UREvents.size(),
9090
UREvents.data(), &alloc, &Event);
9191
}
@@ -139,7 +139,7 @@ __SYCL_EXPORT void *async_malloc_from_pool(sycl::handler &h, size_t size,
139139
} else {
140140
ur_queue_handle_t Q = h.impl->get_queue().getHandleRef();
141141
Adapter.call<sycl::errc::runtime,
142-
sycl::detail::UrApiKind::urEnqueueUSMDeviceAllocExp>(
142+
sycl::detail::UrApiKind::urEnqueueUSMDeviceAllocExp>(
143143
Q, memPoolImpl.get_handle(), size, nullptr, UREvents.size(),
144144
UREvents.data(), &alloc, &Event);
145145
}

sycl/source/detail/buffer_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ buffer_impl::getNativeVector(backend BackendName) const {
8989
// resident on, so pass nullptr for Device param. Buffer interop may not be
9090
// supported by all backends.
9191
Adapter.call<UrApiKind::urMemGetNativeHandle>(NativeMem, /*Dev*/ nullptr,
92-
&Handle);
92+
&Handle);
9393
Handles.push_back(Handle);
9494

9595
if (Platform.getBackend() == backend::opencl) {

sycl/source/detail/context_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ cl_context context_impl::get() const {
112112
getAdapter().call<UrApiKind::urContextRetain>(MContext);
113113
ur_native_handle_t nativeHandle = 0;
114114
getAdapter().call<UrApiKind::urContextGetNativeHandle>(MContext,
115-
&nativeHandle);
115+
&nativeHandle);
116116
return ur::cast<cl_context>(nativeHandle);
117117
}
118118

@@ -591,7 +591,7 @@ context_impl::get_default_memory_pool(const context &Context,
591591
// The memory_pool_impl does not exist for this device yet.
592592
ur_usm_pool_handle_t PoolHandle;
593593
Adapter.call<sycl::errc::runtime,
594-
sycl::detail::UrApiKind::urUSMPoolGetDefaultDevicePoolExp>(
594+
sycl::detail::UrApiKind::urUSMPoolGetDefaultDevicePoolExp>(
595595
this->getHandleRef(), DeviceHandle, &PoolHandle);
596596

597597
auto MemPoolImplPtr = std::make_shared<

sycl/source/detail/device_global_map_entry.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ void DeviceGlobalMapEntry::cleanup() {
185185
DeviceGlobalUSMMem &USMMem = USMPtrIt.second;
186186
detail::usm::freeInternal(USMMem.MPtr, CtxImpl);
187187
if (USMMem.MInitEvent.has_value())
188-
CtxImpl->getAdapter().call<UrApiKind::urEventRelease>(
189-
*USMMem.MInitEvent);
188+
CtxImpl->getAdapter().call<UrApiKind::urEventRelease>(*USMMem.MInitEvent);
190189
#ifndef NDEBUG
191190
// For debugging we set the event and memory to some recognizable values
192191
// to allow us to check that this cleanup happens before erasure.

sycl/source/detail/device_image_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ std::shared_ptr<kernel_impl> device_image_impl::tryGetExtensionKernel(
4545
detail::adapter_impl &Adapter = getSyclObjImpl(Context)->getAdapter();
4646
ur_kernel_handle_t UrKernel = nullptr;
4747
Adapter.call<UrApiKind::urKernelCreate>(UrProgram, AdjustedName.c_str(),
48-
&UrKernel);
48+
&UrKernel);
4949
// Kernel created by urKernelCreate is implicitly retained.
5050

5151
const KernelArgMask *ArgMask = nullptr;

sycl/source/detail/device_image_impl.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,7 @@ class device_image_impl
608608
adapter_impl &Adapter = ContextImpl.getAdapter();
609609

610610
ur_native_handle_t NativeProgram = 0;
611-
Adapter.call<UrApiKind::urProgramGetNativeHandle>(MProgram,
612-
&NativeProgram);
611+
Adapter.call<UrApiKind::urProgramGetNativeHandle>(MProgram, &NativeProgram);
613612
if (ContextImpl.getBackend() == backend::opencl)
614613
__SYCL_OCL_CALL(clRetainProgram, ur::cast<cl_program>(NativeProgram));
615614

@@ -1273,8 +1272,8 @@ class device_image_impl
12731272

12741273
ur_program_handle_t UrProgram = nullptr;
12751274
Adapter.call<UrApiKind::urProgramCreateWithIL>(ContextImpl.getHandleRef(),
1276-
spirv.data(), spirv.size(),
1277-
nullptr, &UrProgram);
1275+
spirv.data(), spirv.size(),
1276+
nullptr, &UrProgram);
12781277
// program created by urProgramCreateWithIL is implicitly retained.
12791278
if (UrProgram == nullptr)
12801279
throw sycl::exception(

sycl/source/detail/device_impl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ device_impl::~device_impl() {
3939
try {
4040
// TODO catch an exception and put it to list of asynchronous exceptions
4141
adapter_impl &Adapter = getAdapter();
42-
ur_result_t Err =
43-
Adapter.call_nocheck<UrApiKind::urDeviceRelease>(MDevice);
42+
ur_result_t Err = Adapter.call_nocheck<UrApiKind::urDeviceRelease>(MDevice);
4443
__SYCL_CHECK_UR_CODE_NO_EXC(Err, Adapter.getBackend());
4544
} catch (std::exception &e) {
4645
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in ~device_impl", e);
@@ -297,7 +296,7 @@ std::vector<device> device_impl::create_sub_devices() const {
297296
uint32_t SubDevicesCount = 0;
298297
adapter_impl &Adapter = getAdapter();
299298
Adapter.call<UrApiKind::urDevicePartition>(MDevice, &Properties, 0, nullptr,
300-
&SubDevicesCount);
299+
&SubDevicesCount);
301300

302301
return create_sub_devices(&Properties, SubDevicesCount);
303302
}

sycl/source/detail/device_impl.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ class device_impl : public std::enable_shared_from_this<device_impl> {
152152
static_assert(
153153
!check_type_in_v<typename ur_ret_t::value_type, bool, std::string>);
154154
size_t ResultSize = 0;
155-
ur_result_t Error =
156-
getAdapter().call_nocheck<UrApiKind::urDeviceGetInfo>(
157-
getHandleRef(), Desc, 0, nullptr, &ResultSize);
155+
ur_result_t Error = getAdapter().call_nocheck<UrApiKind::urDeviceGetInfo>(
156+
getHandleRef(), Desc, 0, nullptr, &ResultSize);
158157
if (Error != UR_RESULT_SUCCESS)
159158
return {Error};
160159
if (ResultSize == 0)
@@ -168,9 +167,8 @@ class device_impl : public std::enable_shared_from_this<device_impl> {
168167
return {Result};
169168
} else {
170169
ur_ret_t Result;
171-
ur_result_t Error =
172-
getAdapter().call_nocheck<UrApiKind::urDeviceGetInfo>(
173-
getHandleRef(), Desc, sizeof(Result), &Result, nullptr);
170+
ur_result_t Error = getAdapter().call_nocheck<UrApiKind::urDeviceGetInfo>(
171+
getHandleRef(), Desc, sizeof(Result), &Result, nullptr);
174172
if (Error == UR_RESULT_SUCCESS)
175173
return {Result};
176174
else
@@ -189,7 +187,7 @@ class device_impl : public std::enable_shared_from_this<device_impl> {
189187
} else if constexpr (is_std_vector_v<ur_ret_t>) {
190188
size_t ResultSize = 0;
191189
getAdapter().call<UrApiKind::urDeviceGetInfo>(getHandleRef(), Desc, 0,
192-
nullptr, &ResultSize);
190+
nullptr, &ResultSize);
193191
if (ResultSize == 0)
194192
return ur_ret_t{};
195193

sycl/source/detail/error_handling/error_handling.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ void handleOutOfResources(const device_impl &DeviceImpl,
4040
adapter_impl &Adapter = DeviceImpl.getAdapter();
4141
uint32_t NumRegisters = 0;
4242
Adapter.call<UrApiKind::urKernelGetInfo>(Kernel, UR_KERNEL_INFO_NUM_REGS,
43-
sizeof(NumRegisters),
44-
&NumRegisters, nullptr);
43+
sizeof(NumRegisters),
44+
&NumRegisters, nullptr);
4545

4646
uint32_t MaxRegistersPerBlock =
4747
DeviceImpl.get_info<ext::codeplay::experimental::info::device::
@@ -121,9 +121,9 @@ void handleInvalidWorkGroupSize(const device_impl &DeviceImpl,
121121
}
122122

123123
size_t MaxWGSize = 0;
124-
Adapter.call<UrApiKind::urDeviceGetInfo>(
125-
Device, UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, sizeof(size_t), &MaxWGSize,
126-
nullptr);
124+
Adapter.call<UrApiKind::urDeviceGetInfo>(Device,
125+
UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE,
126+
sizeof(size_t), &MaxWGSize, nullptr);
127127

128128
const bool HasLocalSize = (NDRDesc.LocalSize[0] != 0);
129129

@@ -376,8 +376,8 @@ void handleInvalidValue(const device_impl &DeviceImpl,
376376

377377
size_t MaxNWGs[] = {0, 0, 0};
378378
Adapter.call<UrApiKind::urDeviceGetInfo>(Device,
379-
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D,
380-
sizeof(MaxNWGs), &MaxNWGs, nullptr);
379+
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D,
380+
sizeof(MaxNWGs), &MaxNWGs, nullptr);
381381
for (unsigned int I = 0; I < NDRDesc.Dims; I++) {
382382
size_t NWgs = NDRDesc.GlobalSize[I] / NDRDesc.LocalSize[I];
383383
if (NWgs > MaxNWGs[I])

sycl/source/detail/graph/graph_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,9 @@ void exec_graph_impl::createCommandBuffers(
940940
}
941941
}
942942

943-
Res = Adapter
944-
.call_nocheck<sycl::detail::UrApiKind::urCommandBufferFinalizeExp>(
945-
OutCommandBuffer);
943+
Res =
944+
Adapter.call_nocheck<sycl::detail::UrApiKind::urCommandBufferFinalizeExp>(
945+
OutCommandBuffer);
946946
if (Res != UR_RESULT_SUCCESS) {
947947
throw sycl::exception(errc::invalid,
948948
"Failed to finalize UR command-buffer");

0 commit comments

Comments
 (0)