Skip to content

Commit 950084e

Browse files
committed
Fix clang-format
Signed-off-by: Dmitry Sidorov <[email protected]>
1 parent e876fd1 commit 950084e

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

sycl/plugins/opencl/pi_opencl.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,24 @@ CONSTFIX char clSetProgramSpecializationConstantName[] =
7373
// Helper to get extensions that are common for all devices within a context
7474
pi_result getSupportedExtensionsWithinContext(pi_context context) {
7575
size_t deviceCount;
76-
cl_int ret_err =
77-
clGetContextInfo(cast<cl_context>(context), CL_CONTEXT_DEVICES, 0,
78-
nullptr, &deviceCount);
76+
cl_int ret_err = clGetContextInfo(
77+
cast<cl_context>(context), CL_CONTEXT_DEVICES, 0, nullptr, &deviceCount);
7978
if (ret_err != CL_SUCCESS || deviceCount < 1)
8079
return PI_INVALID_CONTEXT;
8180
std::vector<cl_device_id> devicesInCtx(deviceCount);
82-
ret_err = clGetContextInfo(
83-
cast<cl_context>(context), CL_CONTEXT_DEVICES,
84-
deviceCount * sizeof(cl_device_id), devicesInCtx.data(), nullptr);
81+
ret_err = clGetContextInfo(cast<cl_context>(context), CL_CONTEXT_DEVICES,
82+
deviceCount * sizeof(cl_device_id),
83+
devicesInCtx.data(), nullptr);
8584

8685
size_t retSize;
8786
for (size_t i = 0; i != deviceCount; ++i) {
88-
ret_err = clGetDeviceInfo(devicesInCtx[i], CL_DEVICE_EXTENSIONS, 0,
89-
nullptr, &retSize);
87+
ret_err = clGetDeviceInfo(devicesInCtx[i], CL_DEVICE_EXTENSIONS, 0, nullptr,
88+
&retSize);
9089
if (ret_err != CL_SUCCESS)
9190
return PI_INVALID_DEVICE;
9291
std::string extensions(retSize, '\0');
93-
ret_err = clGetDeviceInfo(devicesInCtx[i], CL_DEVICE_EXTENSIONS,
94-
retSize, &extensions[0], nullptr);
92+
ret_err = clGetDeviceInfo(devicesInCtx[i], CL_DEVICE_EXTENSIONS, retSize,
93+
&extensions[0], nullptr);
9594
if (ret_err != CL_SUCCESS)
9695
return PI_INVALID_DEVICE;
9796
std::string extension;
@@ -102,7 +101,6 @@ pi_result getSupportedExtensionsWithinContext(pi_context context) {
102101
return cast<pi_result>(ret_err);
103102
}
104103

105-
106104
// USM helper function to get an extension function pointer
107105
template <const char *FuncName, typename T>
108106
static pi_result getExtFuncFromContext(pi_context context, T *fptr) {

0 commit comments

Comments
 (0)