mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
style: format code using clang-format 15.0.6
Related-To: NEO-7500 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a4794e432d
commit
43b790957d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -166,7 +166,7 @@ TEST_F(DeferrableAllocationDeletionTest, givenNotUsedAllocationWhenApplyDeletion
|
||||
EXPECT_FALSE(allocation->isUsed());
|
||||
EXPECT_EQ(0u, memoryManager->freeGraphicsMemoryCalled);
|
||||
while (!asyncDeleter->doWorkInBackground)
|
||||
std::this_thread::yield(); //wait for start async thread work
|
||||
std::this_thread::yield(); // wait for start async thread work
|
||||
std::unique_lock<std::mutex> lock(asyncDeleter->queueMutex);
|
||||
asyncDeleter->allowExit = true;
|
||||
lock.unlock();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -433,7 +433,7 @@ TEST_F(HostPtrManagerTest, GivenHostPtrFilledWith3TripleFragmentsWhenAskedForPop
|
||||
ASSERT_EQ(3u, reqs.requiredFragmentsCount);
|
||||
|
||||
FragmentStorage fragments[maxFragmentsCount];
|
||||
//check all fragments
|
||||
// check all fragments
|
||||
for (int i = 0; i < maxFragmentsCount; i++) {
|
||||
fragments[i].fragmentCpuPointer = const_cast<void *>(reqs.allocationFragments[i].allocationPtr);
|
||||
fragments[i].fragmentSize = reqs.allocationFragments[i].allocationSize;
|
||||
@@ -701,7 +701,7 @@ TEST_F(HostPtrManagerTest, GivenHostPtrManagerFilledWithBigFragmentWhenAskedForF
|
||||
EXPECT_EQ(OverlapStatus::FRAGMENT_NOT_OVERLAPING_WITH_ANY_OTHER, overlapStatus);
|
||||
EXPECT_EQ(nullptr, oustideFragment);
|
||||
|
||||
//partialOverlap
|
||||
// partialOverlap
|
||||
auto ptrPartial = (void *)(((uintptr_t)bigPtr + bigSize) - 100);
|
||||
auto partialBigSize = MemoryConstants::pageSize * 100;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -53,26 +53,26 @@ TEST_F(InternalAllocationStorageTest, whenCleanAllocationListThenRemoveOnlyCompl
|
||||
storage->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation2), TEMPORARY_ALLOCATION);
|
||||
storage->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation3), TEMPORARY_ALLOCATION);
|
||||
|
||||
//head point to alloc 2, tail points to alloc3
|
||||
// head point to alloc 2, tail points to alloc3
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation));
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation2));
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation3));
|
||||
EXPECT_EQ(-1, verifyDListOrder(csr->getTemporaryAllocations().peekHead(), allocation, allocation2, allocation3));
|
||||
|
||||
//now remove element form the middle
|
||||
// now remove element form the middle
|
||||
storage->cleanAllocationList(6, TEMPORARY_ALLOCATION);
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation));
|
||||
EXPECT_FALSE(csr->getTemporaryAllocations().peekContains(*allocation2));
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation3));
|
||||
EXPECT_EQ(-1, verifyDListOrder(csr->getTemporaryAllocations().peekHead(), allocation, allocation3));
|
||||
|
||||
//now remove head
|
||||
// now remove head
|
||||
storage->cleanAllocationList(11, TEMPORARY_ALLOCATION);
|
||||
EXPECT_FALSE(csr->getTemporaryAllocations().peekContains(*allocation));
|
||||
EXPECT_FALSE(csr->getTemporaryAllocations().peekContains(*allocation2));
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekContains(*allocation3));
|
||||
|
||||
//now remove tail
|
||||
// now remove tail
|
||||
storage->cleanAllocationList(16, TEMPORARY_ALLOCATION);
|
||||
EXPECT_TRUE(csr->getTemporaryAllocations().peekIsEmpty());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -124,11 +124,11 @@ struct MultiGraphicsAllocationTests : ::testing::Test {
|
||||
TEST_F(MultiGraphicsAllocationTests, whenCreatingMultiGraphicsAllocationWithSharedStorageThenMigrationIsNotRequired) {
|
||||
|
||||
AllocationProperties allocationProperties{0u,
|
||||
true, //allocateMemory
|
||||
true, // allocateMemory
|
||||
MemoryConstants::pageSize,
|
||||
AllocationType::BUFFER_HOST_MEMORY,
|
||||
false, //multiOsContextCapable
|
||||
false, //isMultiStorageAllocationParam
|
||||
false, // multiOsContextCapable
|
||||
false, // isMultiStorageAllocationParam
|
||||
systemMemoryBitfield};
|
||||
|
||||
auto ptr = memoryManager->createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, allocationProperties, multiGraphicsAllocation);
|
||||
@@ -147,11 +147,11 @@ TEST_F(MultiGraphicsAllocationTests, whenCreatingMultiGraphicsAllocationWithExis
|
||||
uint8_t hostPtr[MemoryConstants::pageSize]{};
|
||||
|
||||
AllocationProperties allocationProperties{0u,
|
||||
false, //allocateMemory
|
||||
false, // allocateMemory
|
||||
MemoryConstants::pageSize,
|
||||
AllocationType::BUFFER_HOST_MEMORY,
|
||||
false, //multiOsContextCapable
|
||||
false, //isMultiStorageAllocationParam
|
||||
false, // multiOsContextCapable
|
||||
false, // isMultiStorageAllocationParam
|
||||
systemMemoryBitfield};
|
||||
|
||||
multiGraphicsAllocation.addAllocation(memoryManager->allocateGraphicsMemoryWithProperties(allocationProperties, hostPtr));
|
||||
@@ -168,11 +168,11 @@ TEST_F(MultiGraphicsAllocationTests, whenCreatingMultiGraphicsAllocationWithExis
|
||||
|
||||
TEST_F(MultiGraphicsAllocationTests, whenCreatingMultiGraphicsAllocationWithSeparatedStorageThenMigrationIsRequired) {
|
||||
AllocationProperties allocationProperties{0u,
|
||||
true, //allocateMemory
|
||||
true, // allocateMemory
|
||||
MemoryConstants::pageSize,
|
||||
AllocationType::BUFFER_HOST_MEMORY,
|
||||
false, //multiOsContextCapable
|
||||
false, //isMultiStorageAllocationParam
|
||||
false, // multiOsContextCapable
|
||||
false, // isMultiStorageAllocationParam
|
||||
systemMemoryBitfield};
|
||||
|
||||
multiGraphicsAllocation.addAllocation(memoryManager->allocateGraphicsMemoryWithProperties(allocationProperties));
|
||||
@@ -188,11 +188,11 @@ TEST_F(MultiGraphicsAllocationTests, whenCreatingMultiGraphicsAllocationWithSepa
|
||||
|
||||
TEST_F(MultiGraphicsAllocationTests, givenMultiGraphicsAllocationThatRequiresMigrationWhenCopyOrMoveMultiGraphicsAllocationThenTheCopyStillRequiresMigration) {
|
||||
AllocationProperties allocationProperties{0u,
|
||||
true, //allocateMemory
|
||||
true, // allocateMemory
|
||||
MemoryConstants::pageSize,
|
||||
AllocationType::BUFFER_HOST_MEMORY,
|
||||
false, //multiOsContextCapable
|
||||
false, //isMultiStorageAllocationParam
|
||||
false, // multiOsContextCapable
|
||||
false, // isMultiStorageAllocationParam
|
||||
systemMemoryBitfield};
|
||||
|
||||
multiGraphicsAllocation.addAllocation(memoryManager->allocateGraphicsMemoryWithProperties(allocationProperties));
|
||||
@@ -220,11 +220,11 @@ struct MigrationSyncDataTests : public MultiGraphicsAllocationTests {
|
||||
void SetUp() override {
|
||||
MultiGraphicsAllocationTests::SetUp();
|
||||
AllocationProperties allocationProperties{0u,
|
||||
true, //allocateMemory
|
||||
true, // allocateMemory
|
||||
MemoryConstants::pageSize,
|
||||
AllocationType::BUFFER_HOST_MEMORY,
|
||||
false, //multiOsContextCapable
|
||||
false, //isMultiStorageAllocationParam
|
||||
false, // multiOsContextCapable
|
||||
false, // isMultiStorageAllocationParam
|
||||
systemMemoryBitfield};
|
||||
|
||||
multiGraphicsAllocation.addAllocation(memoryManager->allocateGraphicsMemoryWithProperties(allocationProperties));
|
||||
|
||||
Reference in New Issue
Block a user