Skip to content

Commit beb9b45

Browse files
committed
[SYCL] Addition of some comments.
Signed-off-by: Garima Gupta <[email protected]>
1 parent 64a562a commit beb9b45

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

sycl/include/CL/sycl/detail/pi.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
#include <CL/sycl/detail/common.hpp>
1414
#include <CL/sycl/detail/os_util.hpp>
1515
#include <CL/sycl/detail/pi.h>
16+
1617
#include <cassert>
1718
#include <string>
1819

1920
// Function to load the shared library
2021
// Implementation is OS dependent.
21-
void *loadOsLibrary(const std::string &library);
22+
void *loadOsLibrary(const std::string &Library);
2223

2324
// Function to get Address of a symbol defined in the shared
24-
// library, Implementation is OS dependent.
25+
// library, implementation is OS dependent.
2526
void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName);
2627

2728
namespace cl {

sycl/plugins/opencl/pi_opencl.cpp

+11-10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
#include "CL/opencl.h"
99
#include <CL/sycl/detail/pi.h>
10+
1011
#include <cassert>
1112
#include <cstring>
1213
#include <string>
@@ -142,19 +143,19 @@ pi_result OCL(piQueueCreate)(pi_context context, pi_device device,
142143
cl_platform_id curPlatform;
143144
cl_int ret_err =
144145
clGetDeviceInfo(cast<cl_device_id>(device), CL_DEVICE_PLATFORM,
145-
sizeof(cl_platform_id), &curPlatform, NULL);
146+
sizeof(cl_platform_id), &curPlatform, nullptr);
146147

147148
CHECK_ERR_SET_NULL_RET(ret_err, queue, ret_err);
148149

149150
size_t platVerSize;
150-
ret_err = clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, 0, NULL,
151+
ret_err = clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, 0, nullptr,
151152
&platVerSize);
152153

153154
CHECK_ERR_SET_NULL_RET(ret_err, queue, ret_err);
154155

155156
std::string platVer(platVerSize, '\0');
156157
ret_err = clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, platVerSize,
157-
&platVer.front(), NULL);
158+
&platVer.front(), nullptr);
158159

159160
CHECK_ERR_SET_NULL_RET(ret_err, queue, ret_err);
160161

@@ -181,7 +182,7 @@ pi_result OCL(piProgramCreate)(pi_context context, const void *il,
181182
size_t deviceCount;
182183

183184
cl_int ret_err = clGetContextInfo(cast<cl_context>(context),
184-
CL_CONTEXT_DEVICES, 0, NULL, &deviceCount);
185+
CL_CONTEXT_DEVICES, 0, nullptr, &deviceCount);
185186

186187
std::vector<cl_device_id> devicesInCtx(deviceCount);
187188

@@ -193,22 +194,22 @@ pi_result OCL(piProgramCreate)(pi_context context, const void *il,
193194

194195
ret_err = clGetContextInfo(cast<cl_context>(context), CL_CONTEXT_DEVICES,
195196
deviceCount * sizeof(cl_device_id),
196-
devicesInCtx.data(), NULL);
197+
devicesInCtx.data(), nullptr);
197198

198199
CHECK_ERR_SET_NULL_RET(ret_err, res_program, CL_INVALID_CONTEXT);
199200

200201
cl_platform_id curPlatform;
201202
ret_err = clGetDeviceInfo(devicesInCtx[0], CL_DEVICE_PLATFORM,
202-
sizeof(cl_platform_id), &curPlatform, NULL);
203+
sizeof(cl_platform_id), &curPlatform, nullptr);
203204

204205
CHECK_ERR_SET_NULL_RET(ret_err, res_program, CL_INVALID_CONTEXT);
205206

206207
size_t devVerSize;
207208
ret_err =
208-
clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, 0, NULL, &devVerSize);
209+
clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, 0, nullptr, &devVerSize);
209210
std::string devVer(devVerSize, '\0');
210211
ret_err = clGetPlatformInfo(curPlatform, CL_PLATFORM_VERSION, devVerSize,
211-
&devVer.front(), NULL);
212+
&devVer.front(), nullptr);
212213

213214
CHECK_ERR_SET_NULL_RET(ret_err, res_program, CL_INVALID_CONTEXT);
214215

@@ -225,10 +226,10 @@ pi_result OCL(piProgramCreate)(pi_context context, const void *il,
225226

226227
size_t extSize;
227228
ret_err =
228-
clGetPlatformInfo(curPlatform, CL_PLATFORM_EXTENSIONS, 0, NULL, &extSize);
229+
clGetPlatformInfo(curPlatform, CL_PLATFORM_EXTENSIONS, 0, nullptr, &extSize);
229230
std::string extStr(extSize, '\0');
230231
ret_err = clGetPlatformInfo(curPlatform, CL_PLATFORM_EXTENSIONS, extSize,
231-
&extStr.front(), NULL);
232+
&extStr.front(), nullptr);
232233

233234
if (ret_err != CL_SUCCESS ||
234235
extStr.find("cl_khr_il_program") == std::string::npos) {

0 commit comments

Comments
 (0)