SWDEV-470698 - fix formatting, add format check workflow (#657)
This commit is contained in:
committad av
GitHub
förälder
5840940caa
incheckning
f7338717ae
@@ -33,7 +33,7 @@ static const size_t MapRegion = 0x100;
|
||||
#else
|
||||
static const size_t BufSize = 0x800000;
|
||||
static const size_t MapRegion = 0x100000;
|
||||
#endif // EMU_ENV
|
||||
#endif // EMU_ENV
|
||||
|
||||
static const unsigned int NumMaps = BufSize / MapRegion;
|
||||
|
||||
@@ -41,20 +41,18 @@ OCLAsyncMap::OCLAsyncMap() { _numSubTests = 1; }
|
||||
|
||||
OCLAsyncMap::~OCLAsyncMap() {}
|
||||
|
||||
void OCLAsyncMap::open(unsigned int test, char* units, double& conversion,
|
||||
unsigned int deviceId) {
|
||||
void OCLAsyncMap::open(unsigned int test, char* units, double& conversion, unsigned int deviceId) {
|
||||
OCLTestImp::open(test, units, conversion, deviceId);
|
||||
CHECK_RESULT((error_ != CL_SUCCESS), "Error opening test");
|
||||
|
||||
cl_mem buffer;
|
||||
buffer = _wrapper->clCreateBuffer(context_, CL_MEM_READ_WRITE,
|
||||
BufSize * sizeof(cl_uint), NULL, &error_);
|
||||
buffer = _wrapper->clCreateBuffer(context_, CL_MEM_READ_WRITE, BufSize * sizeof(cl_uint), NULL,
|
||||
&error_);
|
||||
CHECK_RESULT((error_ != CL_SUCCESS), "clCreateBuffer() failed");
|
||||
buffers_.push_back(buffer);
|
||||
}
|
||||
|
||||
static void CL_CALLBACK notify_callback(const char* errinfo,
|
||||
const void* private_info, size_t cb,
|
||||
static void CL_CALLBACK notify_callback(const char* errinfo, const void* private_info, size_t cb,
|
||||
void* user_data) {}
|
||||
|
||||
void OCLAsyncMap::run(void) {
|
||||
@@ -65,8 +63,8 @@ void OCLAsyncMap::run(void) {
|
||||
|
||||
for (unsigned int i = 0; i < NumMaps; ++i) {
|
||||
values[i] = reinterpret_cast<cl_uint*>(_wrapper->clEnqueueMapBuffer(
|
||||
cmdQueues_[_deviceId], mapBuffer, CL_TRUE, (CL_MAP_READ | CL_MAP_WRITE),
|
||||
offset, region, 0, NULL, NULL, &error_));
|
||||
cmdQueues_[_deviceId], mapBuffer, CL_TRUE, (CL_MAP_READ | CL_MAP_WRITE), offset, region, 0,
|
||||
NULL, NULL, &error_));
|
||||
CHECK_RESULT((error_ != CL_SUCCESS), "clEnqueueMapBuffer() failed");
|
||||
offset += region;
|
||||
}
|
||||
@@ -78,14 +76,14 @@ void OCLAsyncMap::run(void) {
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < NumMaps; ++i) {
|
||||
error_ = _wrapper->clEnqueueUnmapMemObject(cmdQueues_[_deviceId], mapBuffer,
|
||||
values[i], 0, NULL, NULL);
|
||||
error_ = _wrapper->clEnqueueUnmapMemObject(cmdQueues_[_deviceId], mapBuffer, values[i], 0, NULL,
|
||||
NULL);
|
||||
CHECK_RESULT((error_ != CL_SUCCESS), "clEnqueueMapBuffer() failed");
|
||||
}
|
||||
|
||||
values[0] = reinterpret_cast<cl_uint*>(_wrapper->clEnqueueMapBuffer(
|
||||
cmdQueues_[_deviceId], mapBuffer, CL_TRUE, CL_MAP_READ, 0,
|
||||
BufSize * sizeof(cl_uint), 0, NULL, NULL, &error_));
|
||||
values[0] = reinterpret_cast<cl_uint*>(
|
||||
_wrapper->clEnqueueMapBuffer(cmdQueues_[_deviceId], mapBuffer, CL_TRUE, CL_MAP_READ, 0,
|
||||
BufSize * sizeof(cl_uint), 0, NULL, NULL, &error_));
|
||||
CHECK_RESULT((error_ != CL_SUCCESS), "clEnqueueMapBuffer() failed");
|
||||
|
||||
for (unsigned int i = 0; i < NumMaps; ++i) {
|
||||
@@ -95,8 +93,8 @@ void OCLAsyncMap::run(void) {
|
||||
}
|
||||
}
|
||||
|
||||
error_ = _wrapper->clEnqueueUnmapMemObject(cmdQueues_[_deviceId], mapBuffer,
|
||||
values[0], 0, NULL, NULL);
|
||||
error_ =
|
||||
_wrapper->clEnqueueUnmapMemObject(cmdQueues_[_deviceId], mapBuffer, values[0], 0, NULL, NULL);
|
||||
|
||||
_wrapper->clFinish(cmdQueues_[_deviceId]);
|
||||
}
|
||||
|
||||
Referens i nytt ärende
Block a user