mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Code cleanup - constexpr for bitness ults
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
72a0621dc2
commit
7fdab76d96
@ -313,7 +313,7 @@ TEST(MemoryManagerTest, givenForced32BitSetWhenGraphicsMemoryFor32BitAllowedType
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
if (is64bit) {
|
||||
if constexpr (is64bit) {
|
||||
EXPECT_TRUE(allocation->is32BitAllocation());
|
||||
EXPECT_EQ(MemoryPool::System4KBPagesWith32BitGpuAddressing, allocation->getMemoryPool());
|
||||
} else {
|
||||
@ -461,7 +461,7 @@ TEST(MemoryManagerTest, givenForced32BitAndEnabled64kbPagesWhenGraphicsMemoryMus
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
if (is64bit) {
|
||||
if constexpr (is64bit) {
|
||||
EXPECT_TRUE(allocation->is32BitAllocation());
|
||||
} else {
|
||||
EXPECT_FALSE(allocation->is32BitAllocation());
|
||||
|
@ -568,7 +568,7 @@ HWTEST_F(MemoryAllocatorTest, givenStatefulKernelWithPrintfWhenPrintfSurfaceIsCr
|
||||
|
||||
TEST_F(MemoryAllocatorTest, given32BitDeviceWhenPrintfSurfaceIsCreatedThen32BitAllocationsIsMade) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
if (is64bit) {
|
||||
if constexpr (is64bit) {
|
||||
DebugManager.flags.Force32bitAddressing.set(true);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
@ -2816,4 +2816,4 @@ TEST(MemoryManagerTest, givenDuplicateRootDeviceIndicesWhenCreatingMultiGraphics
|
||||
EXPECT_EQ(mockRootDeviceIndex, allocation->getRootDeviceIndex());
|
||||
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user