SWDEV-470698 - fix formatting, add format check workflow (#657)

Этот коммит содержится в:
Danylo Lytovchenko authored and GitHub committed 2025-08-20 19:58:06 +05:30
1 родитель 5840940caa
Коммит f7338717ae
1574 files changed
+162903 -199277

No files matched your search

+13 -17
Просмотреть файл
@@ -33,8 +33,7 @@ static int initializeSeed(void);
/////////////////////////////////////////////////////////////////////////////
BaseTestImp::BaseTestImp()
: _numSubTests(0), _openTest(0), _deviceName(NULL), _architecture(0) {
BaseTestImp::BaseTestImp() : _numSubTests(0), _openTest(0), _deviceName(NULL), _architecture(0) {
_cpu = false;
unsigned int i;
for (i = 0; i < 256; i++) {
@@ -45,7 +44,7 @@ BaseTestImp::BaseTestImp()
_platformIndex = 0;
_perfInfo = 0.0f;
#ifdef __linux__ //
#ifdef __linux__ //
_useThreads = 0; // disable threads on linux
#else
_useThreads = 1; // if available on platform
@@ -54,7 +53,7 @@ BaseTestImp::BaseTestImp()
clearError();
}
void BaseTestImp::checkComplib(unsigned int test, const char *deviceName,
void BaseTestImp::checkComplib(unsigned int test, const char* deviceName,
unsigned int architecture) {
BaseTestImp::open();
devices_ = 0;
@@ -69,7 +68,7 @@ void BaseTestImp::checkComplib(unsigned int test, const char *deviceName,
CHECK_RESULT((error_ != CL_SUCCESS), "clGetPlatformIDs failed");
CHECK_RESULT((numPlatforms == 0), "No platform found");
cl_platform_id *platforms = new cl_platform_id[numPlatforms];
cl_platform_id* platforms = new cl_platform_id[numPlatforms];
error_ = clGetPlatformIDs(numPlatforms, platforms, NULL);
CHECK_RESULT(error_ != CL_SUCCESS, "clGetPlatformIDs failed");
@@ -101,8 +100,8 @@ void BaseTestImp::checkComplib(unsigned int test, const char *deviceName,
CHECK_RESULT(error_ != CL_SUCCESS, "clGetDeviceIDs() failed");
char device_string[200];
clGetDeviceInfo(devices_[_deviceId], CL_DRIVER_VERSION, sizeof(device_string),
&device_string, NULL);
clGetDeviceInfo(devices_[_deviceId], CL_DRIVER_VERSION, sizeof(device_string), &device_string,
NULL);
if (strstr(device_string, "LC")) {
printf("Skipping test since it does not run with LC\n");
failed_ = true;
@@ -117,8 +116,7 @@ void BaseTestImp::open() {
_crcword = 0;
clearError();
}
void BaseTestImp::open(unsigned int test, const char *deviceName,
unsigned int architecture) {
void BaseTestImp::open(unsigned int test, const char* deviceName, unsigned int architecture) {
open();
}
@@ -128,9 +126,9 @@ unsigned int BaseTestImp::getThreadUsage(void) { return _useThreads; }
int BaseTestImp::getNumSubTests(void) { return _numSubTests; }
void BaseTestImp::setDeviceName(const char *name) { _deviceName = name; }
void BaseTestImp::setDeviceName(const char* name) { _deviceName = name; }
const char *BaseTestImp::getDeviceName() { return _deviceName; }
const char* BaseTestImp::getDeviceName() { return _deviceName; }
float BaseTestImp::getPerfInfo(void) { return _perfInfo; }
@@ -142,18 +140,16 @@ void BaseTestImp::setIterationCount(int cnt) { _iterationCnt = cnt; }
unsigned int BaseTestImp::getDeviceId() { return _deviceId; }
void BaseTestImp::setPlatformIndex(unsigned int platformIndex) {
_platformIndex = platformIndex;
}
void BaseTestImp::setPlatformIndex(unsigned int platformIndex) { _platformIndex = platformIndex; }
unsigned int BaseTestImp::getPlatformIndex() { return _platformIndex; }
void BaseTestImp::setErrorMsg(const char *error) {
void BaseTestImp::setErrorMsg(const char* error) {
_errorFlag = true;
_errorMsg.assign((const char *)error);
_errorMsg.assign((const char*)error);
}
const char *BaseTestImp::getErrorMsg() { return _errorMsg.c_str(); }
const char* BaseTestImp::getErrorMsg() { return _errorMsg.c_str(); }
bool BaseTestImp::hasErrorOccured() { return _errorFlag; }