Skip to content

Commit 3f04769

Browse files
style: configure readability-identifier-naming.FunctionCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
1 parent b3261a8 commit 3f04769

File tree

178 files changed

+2538
-2534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+2538
-2534
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ CheckOptions:
2222
value: camelBack
2323
- key: readability-identifier-naming.LocalVariableCase
2424
value: camelBack
25+
- key: readability-identifier-naming.FunctionCase
26+
value: camelBack
2527
- key: modernize-loop-convert.MaxCopySize
2628
value: '16'
2729
- key: modernize-loop-convert.MinConfidence

level_zero/api/core/ze_core_loader.cpp

Lines changed: 137 additions & 137 deletions
Large diffs are not rendered by default.

level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t num
7777
}
7878
for (size_t subrangeNumber = 0; subrangeNumber < subranges.size(); subrangeNumber += NEO::maxFlushSubrangeCount) {
7979
size_t rangeCount = subranges.size() <= subrangeNumber + NEO::maxFlushSubrangeCount ? subranges.size() - subrangeNumber : NEO::maxFlushSubrangeCount;
80-
NEO::Range<NEO::L3Range> range = CreateRange(subranges.begin() + subrangeNumber, rangeCount);
80+
NEO::Range<NEO::L3Range> range = createRange(subranges.begin() + subrangeNumber, rangeCount);
8181

8282
NEO::flushGpuCache<GfxFamily>(commandStream, range, postSyncAddressToFlush, device->getHwInfo());
8383
}

level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void AUBFixtureL0::SetUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn
8282
context = static_cast<ContextImp *>(Context::fromHandle(hContext));
8383

8484
ze_result_t returnValue;
85-
commandList.reset(ult::whitebox_cast(CommandList::create(hwInfo.platform.eProductFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
85+
commandList.reset(ult::whiteboxCast(CommandList::create(hwInfo.platform.eProductFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
8686

8787
returnValue = ZE_RESULT_ERROR_UNINITIALIZED;
8888
ze_command_queue_desc_t queueDesc = {};

level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ inline void initializeProcess(ze_driver_handle_t &driverHandle,
133133
typedef ze_result_t (*pFnzexMemGetIpcHandle)(ze_context_handle_t, const void *, uint32_t *, ze_ipc_mem_handle_t *);
134134
typedef ze_result_t (*pFnzexMemOpenIpcHandle)(ze_context_handle_t, ze_device_handle_t, uint32_t, ze_ipc_mem_handle_t *, ze_ipc_memory_flags_t, void **);
135135

136-
void run_client(int commSocket, uint32_t clientId) {
136+
void runClient(int commSocket, uint32_t clientId) {
137137
std::cout << "Client " << clientId << ", process ID: " << std::dec << getpid() << "\n";
138138

139139
ze_driver_handle_t driverHandle;
@@ -202,7 +202,7 @@ void run_client(int commSocket, uint32_t clientId) {
202202
delete[] heapBuffer;
203203
}
204204

205-
void run_server(bool &validRet) {
205+
void runServer(bool &validRet) {
206206
std::cout << "Server process ID " << std::dec << getpid() << "\n";
207207

208208
ze_driver_handle_t driverHandle;
@@ -331,13 +331,13 @@ int main(int argc, char *argv[]) {
331331
exit(1);
332332
} else if (childPids[i] == 0) {
333333
close(sv[i][0]);
334-
run_client(sv[i][1], i);
334+
runClient(sv[i][1], i);
335335
close(sv[i][1]);
336336
exit(0);
337337
}
338338
}
339339

340-
run_server(outputValidationSuccessful);
340+
runServer(outputValidationSuccessful);
341341

342342
std::cout << "\nZello IPC Results validation "
343343
<< (outputValidationSuccessful ? "PASSED" : "FAILED")

level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf_p2p.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ uint8_t uinitializedPattern = 1;
2020
uint8_t expectedPattern = 7;
2121
size_t allocSize = 4096 + 7; // +7 to break alignment and make it harder
2222

23-
static int sendmsg_fd(int socket, int fd) {
23+
static int sendmsgFd(int socket, int fd) {
2424
char sendBuf[sizeof(ze_ipc_mem_handle_t)] = {};
2525
char cmsgBuf[CMSG_SPACE(sizeof(ze_ipc_mem_handle_t))];
2626

@@ -48,7 +48,7 @@ static int sendmsg_fd(int socket, int fd) {
4848
return 0;
4949
}
5050

51-
static int recvmsg_fd(int socket) {
51+
static int recvmsgFd(int socket) {
5252
int fd = -1;
5353
char recvBuf[sizeof(ze_ipc_mem_handle_t)] = {};
5454
char cmsgBuf[CMSG_SPACE(sizeof(ze_ipc_mem_handle_t))];
@@ -198,7 +198,7 @@ inline void initializeProcess(ze_context_handle_t &context,
198198
SUCCESS_OR_TERMINATE(zeCommandListCreate(context, device, &cmdListDescCopy, &cmdListCopy));
199199
}
200200

201-
void run_client(int commSocket) {
201+
void runClient(int commSocket) {
202202
std::cout << "Client process " << std::dec << getpid() << "\n";
203203

204204
ze_context_handle_t context;
@@ -220,7 +220,7 @@ void run_client(int commSocket) {
220220
SUCCESS_OR_TERMINATE(zeCommandQueueSynchronize(cmdQueue, std::numeric_limits<uint64_t>::max()));
221221

222222
// get the dma_buf from the other process
223-
int dmaBufFd = recvmsg_fd(commSocket);
223+
int dmaBufFd = recvmsgFd(commSocket);
224224
if (dmaBufFd < 0) {
225225
std::cerr << "Failing to get dma_buf fd from server\n";
226226
std::terminate();
@@ -249,7 +249,7 @@ void run_client(int commSocket) {
249249
SUCCESS_OR_TERMINATE(zeContextDestroy(context));
250250
}
251251

252-
void run_server(int commSocket, bool &validRet) {
252+
void runServer(int commSocket, bool &validRet) {
253253
std::cout << "Server process " << std::dec << getpid() << "\n";
254254

255255
ze_context_handle_t context;
@@ -280,7 +280,7 @@ void run_server(int commSocket, bool &validRet) {
280280
// Pass the dma_buf to the other process
281281
int dmaBufFd;
282282
memcpy(static_cast<void *>(&dmaBufFd), &pIpcHandle, sizeof(dmaBufFd));
283-
if (sendmsg_fd(commSocket, static_cast<int>(dmaBufFd)) < 0) {
283+
if (sendmsgFd(commSocket, static_cast<int>(dmaBufFd)) < 0) {
284284
std::cerr << "Failing to send dma_buf fd to client\n";
285285
std::terminate();
286286
}
@@ -346,12 +346,12 @@ int main(int argc, char *argv[]) {
346346
exit(1);
347347
} else if (0 == child) {
348348
close(sv[0]);
349-
run_client(sv[1]);
349+
runClient(sv[1]);
350350
close(sv[1]);
351351
exit(0);
352352
} else {
353353
close(sv[1]);
354-
run_server(sv[0], outputValidationSuccessful);
354+
runServer(sv[0], outputValidationSuccessful);
355355
close(sv[0]);
356356
}
357357

level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CommandListFixture : public DeviceFixture {
2424
void SetUp() {
2525
DeviceFixture::SetUp();
2626
ze_result_t returnValue;
27-
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
27+
commandList.reset(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
2828

2929
ze_event_pool_desc_t eventPoolDesc = {};
3030
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
@@ -61,10 +61,10 @@ struct MultiTileCommandListFixture : public SingleRootMultiSubDeviceFixture {
6161
NEO::EngineGroupType cmdListEngineType = createCopy ? NEO::EngineGroupType::Copy : NEO::EngineGroupType::RenderCompute;
6262

6363
if (!createImmediate) {
64-
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, cmdListEngineType, 0u, returnValue)));
64+
commandList.reset(whiteboxCast(CommandList::create(productFamily, device, cmdListEngineType, 0u, returnValue)));
6565
} else {
6666
const ze_command_queue_desc_t desc = {};
67-
commandList.reset(whitebox_cast(CommandList::createImmediate(productFamily, device, &desc, createInternal, cmdListEngineType, returnValue)));
67+
commandList.reset(whiteboxCast(CommandList::createImmediate(productFamily, device, &desc, createInternal, cmdListEngineType, returnValue)));
6868
}
6969
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
7070

level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -34,7 +34,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
3434
std::vector<std::unique_ptr<NEO::Device>> devices;
3535
devices.push_back(std::unique_ptr<NEO::Device>(neoDevice));
3636

37-
auto driverHandleUlt = whitebox_cast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue));
37+
auto driverHandleUlt = whiteboxCast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue));
3838
driverHandle.reset(driverHandleUlt);
3939

4040
ASSERT_NE(nullptr, driverHandle);
@@ -47,12 +47,12 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
4747
ASSERT_NE(nullptr, device);
4848

4949
ze_command_queue_desc_t queueDesc = {};
50-
commandQueue = whitebox_cast(CommandQueue::create(productFamily, device,
51-
neoDevice->getDefaultEngine().commandStreamReceiver,
52-
&queueDesc,
53-
false,
54-
false,
55-
returnValue));
50+
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device,
51+
neoDevice->getDefaultEngine().commandStreamReceiver,
52+
&queueDesc,
53+
false,
54+
false,
55+
returnValue));
5656
ASSERT_NE(nullptr, commandQueue->commandStream);
5757

5858
commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue);

level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ using CommandQueueExecuteCommandListsGen9 = Test<DeviceFixture>;
3131
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelineSelectAndVfeStateAreAddedToCmdBuffer) {
3232
const ze_command_queue_desc_t desc = {};
3333
ze_result_t returnValue;
34-
auto commandQueue = whitebox_cast(CommandQueue::create(
34+
auto commandQueue = whiteboxCast(CommandQueue::create(
3535
productFamily,
3636
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
3737
ASSERT_NE(nullptr, commandQueue->commandStream);
@@ -72,7 +72,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelin
7272
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsAdded) {
7373
const ze_command_queue_desc_t desc = {};
7474
ze_result_t returnValue;
75-
auto commandQueue = whitebox_cast(CommandQueue::create(
75+
auto commandQueue = whiteboxCast(CommandQueue::create(
7676
productFamily,
7777
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
7878
ASSERT_NE(nullptr, commandQueue->commandStream);
@@ -120,13 +120,13 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBa
120120
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThreadPreemptionForFirstExecuteIsConfigured) {
121121
const ze_command_queue_desc_t desc = {};
122122
ze_result_t returnValue;
123-
auto commandQueue = whitebox_cast(CommandQueue::create(
123+
auto commandQueue = whiteboxCast(CommandQueue::create(
124124
productFamily,
125125
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
126126
ASSERT_NE(nullptr, commandQueue->commandStream);
127127
auto usedSpaceBefore = commandQueue->commandStream->getUsed();
128128

129-
auto commandList = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
129+
auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
130130
commandList->commandListPreemptionMode = NEO::PreemptionMode::MidThread;
131131

132132
ze_command_list_handle_t commandLists[] = {commandList->toHandle()};
@@ -167,16 +167,16 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThre
167167
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemptionModesWhenExecutingThenQueuePreemptionIsSwitchedFromMidThreadToThreadGroupAndMidThread) {
168168
const ze_command_queue_desc_t desc = {};
169169
ze_result_t returnValue;
170-
auto commandQueue = whitebox_cast(CommandQueue::create(
170+
auto commandQueue = whiteboxCast(CommandQueue::create(
171171
productFamily,
172172
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
173173
ASSERT_NE(nullptr, commandQueue->commandStream);
174174
auto usedSpaceBefore = commandQueue->commandStream->getUsed();
175175

176-
auto commandListMidThread = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
176+
auto commandListMidThread = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
177177
commandListMidThread->commandListPreemptionMode = NEO::PreemptionMode::MidThread;
178178

179-
auto commandListThreadGroup = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
179+
auto commandListThreadGroup = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue));
180180
commandListThreadGroup->commandListPreemptionMode = NEO::PreemptionMode::ThreadGroup;
181181

182182
ze_command_list_handle_t commandLists[] = {commandListMidThread->toHandle(),

level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -36,7 +36,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
3636
std::vector<std::unique_ptr<NEO::Device>> devices;
3737
devices.push_back(std::unique_ptr<NEO::Device>(neoDevice));
3838

39-
auto driverHandleUlt = whitebox_cast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue));
39+
auto driverHandleUlt = whiteboxCast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue));
4040
driverHandle.reset(driverHandleUlt);
4141

4242
ASSERT_NE(nullptr, driverHandle);
@@ -49,12 +49,12 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
4949
ASSERT_NE(nullptr, device);
5050

5151
ze_command_queue_desc_t queueDesc = {};
52-
commandQueue = whitebox_cast(CommandQueue::create(productFamily, device,
53-
neoDevice->getDefaultEngine().commandStreamReceiver,
54-
&queueDesc,
55-
false,
56-
false,
57-
returnValue));
52+
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device,
53+
neoDevice->getDefaultEngine().commandStreamReceiver,
54+
&queueDesc,
55+
false,
56+
false,
57+
returnValue));
5858
ASSERT_NE(nullptr, commandQueue->commandStream);
5959

6060
commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue);

0 commit comments

Comments
 (0)