Skip to content

Commit 739d181

Browse files
refactor: correct naming of enum class constants 6/n
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent b802ebf commit 739d181

File tree

118 files changed

+690
-690
lines changed

Some content is hidden

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

118 files changed

+690
-690
lines changed

level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::performCpuMemcpy(cons
10531053

10541054
if (this->dependenciesPresent) {
10551055
auto submissionStatus = this->csr->flushTagUpdate();
1056-
if (submissionStatus != NEO::SubmissionStatus::SUCCESS) {
1056+
if (submissionStatus != NEO::SubmissionStatus::success) {
10571057
return getErrorCodeForSubmissionStatus(submissionStatus);
10581058
}
10591059
}

level_zero/core/source/cmdqueue/cmdqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ NEO::SubmissionStatus CommandQueueImp::submitBatchBuffer(size_t offset, NEO::Res
138138

139139
csr->setActivePartitions(partitionCount);
140140
auto ret = csr->submitBatchBuffer(batchBuffer, csr->getResidencyAllocations());
141-
if (ret != NEO::SubmissionStatus::SUCCESS) {
141+
if (ret != NEO::SubmissionStatus::success) {
142142
commandStream.getGraphicsAllocation()->updateTaskCount(csr->peekTaskCount(), csr->getOsContext().getContextId());
143143
commandStream.getGraphicsAllocation()->updateResidencyTaskCount(csr->peekTaskCount(), csr->getOsContext().getContextId());
144144
return ret;

level_zero/core/source/cmdqueue/cmdqueue_hw.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::handleSubmissionAndCompletionResults(
12141214
NEO::SubmissionStatus submitRet,
12151215
ze_result_t completionRet) {
12161216

1217-
if ((submitRet != NEO::SubmissionStatus::SUCCESS) || (completionRet == ZE_RESULT_ERROR_DEVICE_LOST)) {
1217+
if ((submitRet != NEO::SubmissionStatus::success) || (completionRet == ZE_RESULT_ERROR_DEVICE_LOST)) {
12181218
for (auto &gfx : this->csr->getResidencyAllocations()) {
12191219
if (this->csr->peekLatestFlushedTaskCount() == 0) {
12201220
gfx->releaseUsageInOsContext(this->csr->getOsContext().getContextId());

level_zero/core/source/helpers/error_code_helper_l0.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2022 Intel Corporation
2+
* Copyright (C) 2022-2023 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -12,13 +12,13 @@
1212
namespace L0 {
1313
ze_result_t getErrorCodeForSubmissionStatus(NEO::SubmissionStatus status) {
1414
switch (status) {
15-
case NEO::SubmissionStatus::SUCCESS:
15+
case NEO::SubmissionStatus::success:
1616
return ZE_RESULT_SUCCESS;
1717
break;
18-
case NEO::SubmissionStatus::OUT_OF_MEMORY:
18+
case NEO::SubmissionStatus::outOfMemory:
1919
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
2020
break;
21-
case NEO::SubmissionStatus::OUT_OF_HOST_MEMORY:
21+
case NEO::SubmissionStatus::outOfHostMemory:
2222
return ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY;
2323
break;
2424
default:

level_zero/core/source/memory/memory_operations_helper.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313

1414
static ze_result_t changeMemoryOperationStatusToL0ResultType(NEO::MemoryOperationsStatus status) {
1515
switch (status) {
16-
case NEO::MemoryOperationsStatus::SUCCESS:
16+
case NEO::MemoryOperationsStatus::success:
1717
return ZE_RESULT_SUCCESS;
1818

19-
case NEO::MemoryOperationsStatus::MEMORY_NOT_FOUND:
19+
case NEO::MemoryOperationsStatus::memoryNotFound:
2020
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
2121

22-
case NEO::MemoryOperationsStatus::OUT_OF_MEMORY:
22+
case NEO::MemoryOperationsStatus::outOfMemory:
2323
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
2424

25-
case NEO::MemoryOperationsStatus::FAILED:
25+
case NEO::MemoryOperationsStatus::failed:
2626
return ZE_RESULT_ERROR_DEVICE_LOST;
2727

28-
case NEO::MemoryOperationsStatus::DEVICE_UNINITIALIZED:
28+
case NEO::MemoryOperationsStatus::deviceUninitialized:
2929
return ZE_RESULT_ERROR_UNINITIALIZED;
3030

31-
case NEO::MemoryOperationsStatus::UNSUPPORTED:
31+
case NEO::MemoryOperationsStatus::unsupported:
3232
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
3333

3434
default:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AUBFixtureL0 {
6060
void expectMemory(void *gfxAddress, const void *srcAddress, size_t length) {
6161
NEO::CommandStreamReceiverSimulatedCommonHw<FamilyType> *csrSimulated = getSimulatedCsr<FamilyType>();
6262

63-
if (NEO::testMode == NEO::TestMode::AubTestsWithTbx) {
63+
if (NEO::testMode == NEO::TestMode::aubTestsWithTbx) {
6464
auto tbxCsr = csrSimulated;
6565
EXPECT_TRUE(tbxCsr->expectMemoryEqual(gfxAddress, srcAddress, length));
6666
csrSimulated = static_cast<NEO::CommandStreamReceiverSimulatedCommonHw<FamilyType> *>(
@@ -76,7 +76,7 @@ class AUBFixtureL0 {
7676
void expectNotEqualMemory(void *gfxAddress, const void *srcAddress, size_t length) {
7777
NEO::CommandStreamReceiverSimulatedCommonHw<FamilyType> *csrSimulated = getSimulatedCsr<FamilyType>();
7878

79-
if (NEO::testMode == NEO::TestMode::AubTestsWithTbx) {
79+
if (NEO::testMode == NEO::TestMode::aubTestsWithTbx) {
8080
auto tbxCsr = csrSimulated;
8181
EXPECT_TRUE(tbxCsr->expectMemoryNotEqual(gfxAddress, srcAddress, length));
8282
csrSimulated = static_cast<NEO::CommandStreamReceiverSimulatedCommonHw<FamilyType> *>(
@@ -91,7 +91,7 @@ class AUBFixtureL0 {
9191
template <typename FamilyType>
9292
void expectMMIO(uint32_t mmioRegister, uint32_t expectedValue) {
9393
NEO::AUBCommandStreamReceiverHw<FamilyType> *aubCsr = static_cast<NEO::AUBCommandStreamReceiverHw<FamilyType> *>(csr);
94-
if (NEO::testMode == NEO::TestMode::AubTestsWithTbx) {
94+
if (NEO::testMode == NEO::TestMode::aubTestsWithTbx) {
9595
aubCsr = static_cast<NEO::AUBCommandStreamReceiverHw<FamilyType> *>(static_cast<NEO::CommandStreamReceiverWithAUBDump<NEO::TbxCommandStreamReceiverHw<FamilyType>> *>(csr)->aubCSR.get());
9696
}
9797

level_zero/core/test/common/ult_specific_config_l0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void setupTestFiles(std::string testBinaryFiles, int32_t revId) {
4545
}
4646

4747
std::string getBaseExecutionDir() {
48-
if (testMode != TestMode::AubTests) {
48+
if (testMode != TestMode::aubTests) {
4949
return "level_zero/";
5050
}
5151
return "";

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ HWTEST2_F(CommandListExecuteImmediate, givenOutOfHostMemoryErrorOnFlushWhenExecu
206206
auto &commandListImmediate = static_cast<MockCommandListImmediate<gfxCoreFamily> &>(*commandList);
207207

208208
auto &commandStreamReceiver = neoDevice->getUltCommandStreamReceiver<FamilyType>();
209-
commandStreamReceiver.flushReturnValue = SubmissionStatus::OUT_OF_HOST_MEMORY;
209+
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfHostMemory;
210210
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY, commandListImmediate.executeCommandListImmediateWithFlushTask(false, false, false, false));
211211
}
212212

@@ -218,7 +218,7 @@ HWTEST2_F(CommandListExecuteImmediate, givenOutOfDeviceMemoryErrorOnFlushWhenExe
218218
auto &commandListImmediate = static_cast<MockCommandListImmediate<gfxCoreFamily> &>(*commandList);
219219

220220
auto &commandStreamReceiver = neoDevice->getUltCommandStreamReceiver<FamilyType>();
221-
commandStreamReceiver.flushReturnValue = SubmissionStatus::OUT_OF_MEMORY;
221+
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfMemory;
222222
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, commandListImmediate.executeCommandListImmediateWithFlushTask(false, false, false, false));
223223
}
224224

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,12 @@ HWTEST2_F(CommandListCreate, givenFlushErrorWhenPerformingCpuMemoryCopyThenError
483483

484484
auto &commandStreamReceiver = neoDevice->getUltCommandStreamReceiver<FamilyType>();
485485

486-
commandStreamReceiver.flushReturnValue = SubmissionStatus::OUT_OF_MEMORY;
486+
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfMemory;
487487
CpuMemCopyInfo cpuMemCopyInfo(nullptr, nullptr, 8);
488488
returnValue = commandList0->performCpuMemcpy(cpuMemCopyInfo, nullptr, 6, nullptr);
489489
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, returnValue);
490490

491-
commandStreamReceiver.flushReturnValue = SubmissionStatus::OUT_OF_HOST_MEMORY;
491+
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfHostMemory;
492492

493493
returnValue = commandList0->performCpuMemcpy(cpuMemCopyInfo, nullptr, 6, nullptr);
494494
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY, returnValue);

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ HWTEST2_F(CommandQueueCreate, givenOutOfHostMemoryErrorFromSubmitBatchBufferWhen
366366
const ze_command_queue_desc_t desc = {};
367367
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
368368
commandQueue->initialize(false, false, false);
369-
commandQueue->submitBatchBufferReturnValue = NEO::SubmissionStatus::OUT_OF_HOST_MEMORY;
369+
commandQueue->submitBatchBufferReturnValue = NEO::SubmissionStatus::outOfHostMemory;
370370

371371
Mock<KernelImp> kernel;
372372
kernel.immutableData.device = device;
@@ -591,7 +591,7 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer
591591
TaskCountType flushedTaskCountBefore = commandQueue->csr->peekLatestFlushedTaskCount();
592592
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false);
593593
EXPECT_EQ(csr->makeResidentCalledTimes, 0u);
594-
EXPECT_EQ(ret, NEO::SubmissionStatus::SUCCESS);
594+
EXPECT_EQ(ret, NEO::SubmissionStatus::success);
595595
EXPECT_EQ((peekTaskCountBefore + 1), commandQueue->csr->peekTaskCount());
596596
EXPECT_EQ((flushedTaskCountBefore + 1), commandQueue->csr->peekLatestFlushedTaskCount());
597597
EXPECT_EQ(commandQueue->commandStream.getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
@@ -617,7 +617,7 @@ HWTEST_F(CommandQueueCreate, givenCommandStreamReceiverFailsThenSubmitBatchBuffe
617617
TaskCountType peekTaskCountBefore = commandQueue->csr->peekTaskCount();
618618
TaskCountType flushedTaskCountBefore = commandQueue->csr->peekLatestFlushedTaskCount();
619619
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false);
620-
EXPECT_EQ(ret, NEO::SubmissionStatus::FAILED);
620+
EXPECT_EQ(ret, NEO::SubmissionStatus::failed);
621621
EXPECT_EQ(peekTaskCountBefore, commandQueue->csr->peekTaskCount());
622622
EXPECT_EQ(flushedTaskCountBefore, commandQueue->csr->peekLatestFlushedTaskCount());
623623
EXPECT_EQ(commandQueue->commandStream.getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
@@ -641,7 +641,7 @@ HWTEST_F(CommandQueueCreate, givenOutOfMemoryThenSubmitBatchBufferReturnsOutOfMe
641641
commandQueue->startingCmdBuffer = &commandQueue->commandStream;
642642
ResidencyContainer container;
643643
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false);
644-
EXPECT_EQ(ret, NEO::SubmissionStatus::OUT_OF_MEMORY);
644+
EXPECT_EQ(ret, NEO::SubmissionStatus::outOfMemory);
645645

646646
commandQueue->destroy();
647647
}
@@ -663,7 +663,7 @@ TEST_F(CommandQueueCreate, WhenSubmitBatchBufferThenDisableFlatRingBuffer) {
663663
ResidencyContainer container;
664664
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false);
665665

666-
EXPECT_EQ(ret, NEO::SubmissionStatus::SUCCESS);
666+
EXPECT_EQ(ret, NEO::SubmissionStatus::success);
667667
EXPECT_TRUE(csr->latestFlushedBatchBuffer.disableFlatRingBuffer);
668668

669669
commandQueue->destroy();
@@ -1173,7 +1173,7 @@ class MockCommandQueueSubmitBatchBuffer : public MockCommandQueue<gfxCoreFamily>
11731173
public:
11741174
MockCommandQueueSubmitBatchBuffer(L0::Device *device, NEO::CommandStreamReceiver *csr, const ze_command_queue_desc_t *desc) : MockCommandQueue<gfxCoreFamily>(device, csr, desc) {}
11751175

1176-
ADDMETHOD_NOBASE(submitBatchBuffer, NEO::SubmissionStatus, NEO::SubmissionStatus::SUCCESS,
1176+
ADDMETHOD_NOBASE(submitBatchBuffer, NEO::SubmissionStatus, NEO::SubmissionStatus::success,
11771177
(size_t offset, NEO::ResidencyContainer &residencyContainer, void *endingCmdPtr,
11781178
bool isCooperative));
11791179
};
@@ -1183,7 +1183,7 @@ HWTEST2_F(ExecuteCommandListTests, givenOutOfMemorySubmitBatchBufferThenExecuteC
11831183
NEO::CommandStreamReceiver *csr;
11841184
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
11851185
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1186-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::OUT_OF_MEMORY;
1186+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::outOfMemory;
11871187

11881188
commandQueue->initialize(false, false, false);
11891189
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
@@ -1283,7 +1283,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenExecuteComma
12831283
NEO::CommandStreamReceiver *csr;
12841284
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
12851285
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1286-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1286+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::failed;
12871287

12881288
commandQueue->initialize(false, false, false);
12891289
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
@@ -1305,7 +1305,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenResetGraphic
13051305
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
13061306

13071307
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1308-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1308+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::failed;
13091309

13101310
commandQueue->initialize(false, false, false);
13111311
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
@@ -1336,7 +1336,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenResetGraphic
13361336
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
13371337

13381338
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1339-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1339+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::failed;
13401340

13411341
commandQueue->initialize(false, false, false);
13421342
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
@@ -1365,7 +1365,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenWaitForCompl
13651365
NEO::CommandStreamReceiver *csr;
13661366
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
13671367
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1368-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1368+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::failed;
13691369

13701370
commandQueue->initialize(false, false, false);
13711371
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
@@ -1388,7 +1388,7 @@ HWTEST2_F(ExecuteCommandListTests, givenSuccessfulSubmitBatchBufferThenExecuteCo
13881388
NEO::CommandStreamReceiver *csr;
13891389
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
13901390
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1391-
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::SUCCESS;
1391+
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::success;
13921392

13931393
commandQueue->initialize(false, false, false);
13941394
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();

0 commit comments

Comments
 (0)