diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp index 8583fa39da..b52ece2d2c 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp @@ -377,7 +377,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueScratchSpaceTests, GivenKernelRequiringScratc itorCmd = find(itorfirstBBEnd, cmdList.end()); itorCmdForStateBase = find(itorWalker, cmdList.end()); ASSERT_NE(itorWalker, itorCmd); - if (is64bit) { + if constexpr (is64bit) { ASSERT_NE(itorCmdForStateBase, itorCmd); } else { //no SBA not dirty @@ -421,9 +421,9 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueScratchSpaceTests, GivenKernelRequiringScratc ASSERT_NE(finalItorToSBA, cmdList.end()); auto *finalSba2 = (STATE_BASE_ADDRESS *)*finalItorToSBA; auto GSBaddress = finalSba2->getGeneralStateBaseAddress(); - if (is32bit) { + if constexpr (is32bit) { EXPECT_EQ(0u, GSBaddress); - } else if (is64bit) { + } else { EXPECT_EQ(graphicsAllocation2->getGpuAddress(), GSBaddress + ScratchSpaceConstants::scratchSpaceOffsetFor64Bit); } @@ -475,7 +475,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueKernelWithScratch, givenDeviceForcing32bitAll typedef typename PARSE::MEDIA_VFE_STATE MEDIA_VFE_STATE; typedef typename PARSE::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; - if (is64bit) { + if constexpr (is64bit) { CommandStreamReceiver *csr = &pDevice->getGpgpuCommandStreamReceiver(); auto memoryManager = csr->getMemoryManager(); memoryManager->setForce32BitAllocations(true); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp index f71c359514..bd223bfffa 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp @@ -702,7 +702,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu if (sharedDeviceInfo.force32BitAddressess) { EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex(), false), GSHaddress); } else { - if (is64bit) { + if constexpr (is64bit) { EXPECT_EQ(graphicsAddress - ScratchSpaceConstants::scratchSpaceOffsetFor64Bit, GSHaddress); } else { EXPECT_EQ(0u, GSHaddress); @@ -813,7 +813,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNdRangeKer if (sharedDeviceInfo.force32BitAddressess) { EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex(), false), GSHaddress); } else { - if (is64bit) { + if constexpr (is64bit) { EXPECT_EQ(graphicsAddress - ScratchSpaceConstants::scratchSpaceOffsetFor64Bit, GSHaddress); } else { EXPECT_EQ(0u, GSHaddress); @@ -883,7 +883,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocationsModeSto std::unique_ptr allocationReusable = commandStreamReceiver->getInternalAllocationStorage()->obtainReusableAllocation(4096, GraphicsAllocation::AllocationType::LINEAR_STREAM); if (allocationReusable.get() != nullptr) { - if (is64bit) { + if constexpr (is64bit) { EXPECT_NE(scratchAllocation, allocationReusable.get()); } pDevice->getMemoryManager()->freeGraphicsMemory(allocationReusable.release()); @@ -891,7 +891,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocationsModeSto } HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocationsModeStore32bitWhenFlushingTaskThenScratchAllocationStoredOnTemporaryAllocationList) { - if (is64bit) { + if constexpr (is64bit) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.Force32bitAddressing.set(true); diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 038bbffbf9..9103869185 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -435,7 +435,7 @@ TEST_F(DeviceGetCapsTest, givenForce32bitAddressingWhenCapsAreCreatedThenDeviceR auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); const auto &caps = device->getDeviceInfo(); const auto &sharedCaps = device->getSharedDeviceInfo(); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(sharedCaps.force32BitAddressess); } else { EXPECT_FALSE(sharedCaps.force32BitAddressess); diff --git a/opencl/test/unit_test/device/device_tests.cpp b/opencl/test/unit_test/device/device_tests.cpp index c8cf8d095e..8145ecd1f4 100644 --- a/opencl/test/unit_test/device/device_tests.cpp +++ b/opencl/test/unit_test/device/device_tests.cpp @@ -126,7 +126,7 @@ TEST_F(DeviceTest, WhenDeviceIsCreatedThenOsTimeIsNotNull) { TEST_F(DeviceTest, GivenDebugVariableForcing32BitAllocationsWhenDeviceIsCreatedThenMemoryManagerHasForce32BitFlagSet) { DebugManager.flags.Force32bitAddressing.set(true); auto pDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(pDevice->getDeviceInfo().force32BitAddressess); EXPECT_TRUE(pDevice->getMemoryManager()->peekForce32BitAllocations()); } else { diff --git a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp index fc8784f307..32311e06b8 100644 --- a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp +++ b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp @@ -20,7 +20,7 @@ BXTTEST_F(BxtDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResoluti BXTTEST_F(BxtDeviceCaps, givenBxtDeviceWhenAskedFor32BitSupportThenCorrectValuesAreReturned) { const auto &sharedCaps = pDevice->getDeviceInfo(); auto memoryManager = pDevice->getMemoryManager(); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(memoryManager->peekForce32BitAllocations()); EXPECT_TRUE(sharedCaps.force32BitAddressess); } else { diff --git a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp index f26b79f218..f5614c2ca6 100644 --- a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp @@ -24,7 +24,7 @@ GLKTEST_F(Gen9DeviceCaps, givenGlkDeviceWhenAskedForDoubleSupportThenTrueIsRetur GLKTEST_F(Gen9DeviceCaps, GlkIs32BitOsAllocatorAvailable) { const auto &caps = pDevice->getDeviceInfo(); auto memoryManager = pDevice->getMemoryManager(); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(memoryManager->peekForce32BitAllocations()); EXPECT_TRUE(caps.force32BitAddressess); } else { diff --git a/opencl/test/unit_test/kernel/kernel_tests.cpp b/opencl/test/unit_test/kernel/kernel_tests.cpp index a08cb78948..5169775839 100644 --- a/opencl/test/unit_test/kernel/kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_tests.cpp @@ -614,7 +614,7 @@ TEST_F(KernelPrivateSurfaceTest, WhenPrivateSurfaceAllocationFailsThenOutOfResou } TEST_F(KernelPrivateSurfaceTest, given32BitDeviceWhenKernelIsCreatedThenPrivateSurfaceIs32BitAllocation) { - if (is64bit) { + if constexpr (is64bit) { pDevice->getMemoryManager()->setForce32BitAllocations(true); auto pKernelInfo = std::make_unique(); diff --git a/opencl/test/unit_test/mem_obj/buffer_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_tests.cpp index 72185d6b1a..8fe7bd11d1 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests.cpp @@ -559,7 +559,7 @@ TEST(Buffer, givenClMemCopyHostPointerPassedToBufferCreateWhenAllocationIsNotInS std::unique_ptr buffer(Buffer::create(&ctx, flags, sizeof(memory), memory, retVal)); ASSERT_NE(nullptr, buffer.get()); auto taskCountSent = device->getGpgpuCommandStreamReceiver().peekLatestFlushedTaskCount(); - if (is64bit) { + if constexpr (is64bit) { EXPECT_LT(taskCount, taskCountSent); } } diff --git a/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp b/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp index 19faf6faff..73fb352eae 100644 --- a/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -96,7 +96,7 @@ TEST_F(ImageFromSubBufferTest, GivenSubBufferWithOffsetGreaterThan4gbWhenCreatin uint64_t offsetExpected = 0; cl_buffer_region region = {0, size / 2}; - if (is64bit) { + if constexpr (is64bit) { offsetExpected = 8 * GB; region = {static_cast(offsetExpected), size / 2}; } diff --git a/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp b/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp index a5910af127..3457dd3678 100644 --- a/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp +++ b/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp @@ -192,7 +192,7 @@ TEST(ZeroCopyBufferWith32BitAddressing, GivenDeviceSupporting32BitAddressingWhen EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(buffer->isMemObjZeroCopy()); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->is32BitAllocation()); } alignedFree(host_ptr); diff --git a/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl b/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl index ee3dd7aa19..c6021eb294 100644 --- a/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl +++ b/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl @@ -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()); diff --git a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp index e8e0684171..2a149de330 100644 --- a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -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(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); @@ -2816,4 +2816,4 @@ TEST(MemoryManagerTest, givenDuplicateRootDeviceIndicesWhenCreatingMultiGraphics EXPECT_EQ(mockRootDeviceIndex, allocation->getRootDeviceIndex()); memoryManager.freeGraphicsMemory(allocation); -} \ No newline at end of file +} diff --git a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 74f873f65e..fd2ba300aa 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -796,7 +796,7 @@ TEST(DrmMemoryManagerTest2, givenDrmMemoryManagerWhengetSystemSharedMemoryIsCall TEST_F(DrmMemoryManagerTest, GivenBitnessWhenGettingMaxApplicationAddressThenCorrectValueIsReturned) { uint64_t maxAddr = memoryManager->getMaxApplicationAddress(); - if (is64bit) { + if constexpr (is64bit) { EXPECT_EQ(maxAddr, MemoryConstants::max64BitAppAddress); } else { EXPECT_EQ(maxAddr, MemoryConstants::max32BitAppAddress); diff --git a/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp index 76a096f194..c94ab865b1 100644 --- a/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp @@ -628,7 +628,7 @@ TEST_F(WddmMemoryManagerTest, GivenForce32bitAddressingAndRequireSpecificBitness auto *gpuAllocation = memoryManager->createGraphicsAllocationFromSharedHandle(osHandle, properties, true); ASSERT_NE(nullptr, gpuAllocation); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(gpuAllocation->is32BitAllocation()); uint64_t base = memoryManager->getExternalHeapBaseAddress(gpuAllocation->getRootDeviceIndex(), gpuAllocation->isAllocatedInLocalMemoryPool()); @@ -652,7 +652,7 @@ TEST_F(WddmMemoryManagerTest, GivenForce32bitAddressingAndNotRequiredSpecificBit ASSERT_NE(nullptr, gpuAllocation); EXPECT_FALSE(gpuAllocation->is32BitAllocation()); - if (is64bit) { + if constexpr (is64bit) { uint64_t base = 0; EXPECT_EQ(base, gpuAllocation->getGpuBaseAddress()); } diff --git a/opencl/test/unit_test/program/program_data_tests.cpp b/opencl/test/unit_test/program/program_data_tests.cpp index 0d2151c15d..234952e8a2 100644 --- a/opencl/test/unit_test/program/program_data_tests.cpp +++ b/opencl/test/unit_test/program/program_data_tests.cpp @@ -364,7 +364,7 @@ TEST_F(ProgramDataTest, GivenDeviceForcing32BitMessagesWhenConstAllocationIsPres EXPECT_NE(nullptr, pProgram->getConstantSurface(pContext->getDevice(0)->getRootDeviceIndex())); EXPECT_EQ(0, memcmp(constValue, pProgram->getConstantSurface(pContext->getDevice(0)->getRootDeviceIndex())->getUnderlyingBuffer(), constSize)); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(pProgram->getConstantSurface(pContext->getDevice(0)->getRootDeviceIndex())->is32BitAllocation()); } } @@ -419,7 +419,7 @@ TEST_F(ProgramDataTest, Given32BitDeviceWhenGlobalMemorySurfaceIsPresentThenItHa EXPECT_NE(nullptr, pProgram->getGlobalSurface(pContext->getDevice(0)->getRootDeviceIndex())); EXPECT_EQ(0, memcmp(globalValue, pProgram->getGlobalSurface(pContext->getDevice(0)->getRootDeviceIndex())->getUnderlyingBuffer(), globalSize)); - if (is64bit) { + if constexpr (is64bit) { EXPECT_TRUE(pProgram->getGlobalSurface(pContext->getDevice(0)->getRootDeviceIndex())->is32BitAllocation()); } diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index 9bde27a70c..246f8a9202 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -2166,7 +2166,7 @@ TEST_F(Program32BitTests, givenDeviceWithForce32BitAddressingOnWhenProgramIsCrea auto internalOptions = program.getInitInternalOptions(); std::string s1 = internalOptions; size_t pos = s1.find(NEO::CompilerOptions::arch32bit.data()); - if (is64bit) { + if constexpr (is64bit) { EXPECT_NE(pos, std::string::npos); } else { EXPECT_EQ(pos, std::string::npos); diff --git a/shared/test/common/test_macros/test_checks_shared.cpp b/shared/test/common/test_macros/test_checks_shared.cpp index 60dba005d0..19a7d2d73f 100644 --- a/shared/test/common/test_macros/test_checks_shared.cpp +++ b/shared/test/common/test_macros/test_checks_shared.cpp @@ -8,7 +8,6 @@ #include "shared/test/common/test_macros/test_checks_shared.h" #include "shared/source/device/device.h" -#include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_helper.h" #include "shared/test/common/helpers/default_hw_info.h" @@ -16,10 +15,6 @@ using namespace NEO; -bool TestChecks::is64Bit() { - return ::is64bit; -} - bool TestChecks::supportsBlitter(const HardwareInfo *pHardwareInfo) { auto engines = HwHelper::get(::renderCoreFamily).getGpgpuEngineInstances(*pHardwareInfo); for (const auto &engine : engines) { diff --git a/shared/test/common/test_macros/test_checks_shared.h b/shared/test/common/test_macros/test_checks_shared.h index ce33633436..c107ed4086 100644 --- a/shared/test/common/test_macros/test_checks_shared.h +++ b/shared/test/common/test_macros/test_checks_shared.h @@ -6,6 +6,8 @@ */ #pragma once +#include "shared/source/helpers/constants.h" + #include "gtest/gtest.h" #include @@ -15,7 +17,6 @@ class Device; struct HardwareInfo; namespace TestChecks { -bool is64Bit(); bool supportsBlitter(const HardwareInfo *pHardwareInfo); bool supportsImages(const HardwareInfo &hardwareInfo); bool supportsImages(const std::unique_ptr &pHardwareInfo); @@ -26,14 +27,14 @@ bool supportsSvm(const Device *pDevice); } // namespace NEO -#define REQUIRE_32BIT_OR_SKIP() \ - if (NEO::TestChecks::is64Bit() == true) { \ - GTEST_SKIP(); \ +#define REQUIRE_32BIT_OR_SKIP() \ + if constexpr (::is64bit == true) { \ + GTEST_SKIP(); \ } -#define REQUIRE_64BIT_OR_SKIP() \ - if (NEO::TestChecks::is64Bit() == false) { \ - GTEST_SKIP(); \ +#define REQUIRE_64BIT_OR_SKIP() \ + if constexpr (::is64bit == false) { \ + GTEST_SKIP(); \ } #define REQUIRE_SVM_OR_SKIP(param) \ diff --git a/shared/test/unit_test/memory_manager/page_table_tests.cpp b/shared/test/unit_test/memory_manager/page_table_tests.cpp index 6325e5e8d0..b5dd8d3185 100644 --- a/shared/test/unit_test/memory_manager/page_table_tests.cpp +++ b/shared/test/unit_test/memory_manager/page_table_tests.cpp @@ -20,8 +20,6 @@ using namespace NEO; -static const bool is64Bit = (sizeof(void *) == 8); - template class MockPageTable : public PageTable { public: @@ -105,7 +103,7 @@ class GGTTPageTable : public PDPE { class PageTableFixture { protected: const size_t pageSize = 1 << 12; - const uintptr_t refAddr = uintptr_t(1) << (is64Bit ? 46 : 31); + const uintptr_t refAddr = uintptr_t(1) << (is64bit ? 46 : 31); MockPhysicalAddressAllocator allocator; uint64_t startAddress = 0x1000; @@ -176,11 +174,11 @@ TEST_F(PageTableTests48, WhenAssigningWalkerThenWalkIsExecutedCorrectly) { } TEST_F(PageTableTests48, givenReservedPhysicalAddressWhenPageWalkIsCalledThenPageTablesAreFilledWithProperAddresses) { - if (is64Bit) { + if constexpr (is64bit) { std::unique_ptr pageTable(std::make_unique(&allocator)); - int shiftPML4 = is64Bit ? (9 + 9 + 9 + 12) : 0; - int shiftPDP = is64Bit ? (9 + 9 + 12) : 0; + int shiftPML4 = (9 + 9 + 9 + 12); + int shiftPDP = (9 + 9 + 12); uintptr_t gpuVa = (uintptr_t(0x1) << (shiftPML4)) | (uintptr_t(0x1) << (shiftPDP)) | (uintptr_t(0x1) << (9 + 12)) | 0x100; @@ -208,11 +206,11 @@ TEST_F(PageTableTests48, givenReservedPhysicalAddressWhenPageWalkIsCalledThenPag } TEST_F(PageTableTests48, givenBigGpuAddressWhenPageWalkIsCalledThenPageTablesAreFilledWithProperAddresses) { - if (is64Bit) { + if constexpr (is64bit) { std::unique_ptr pageTable(std::make_unique(&allocator)); - int shiftPML4 = is64Bit ? (47) : 0; - int shiftPDP = is64Bit ? (9 + 9 + 12) : 0; + int shiftPML4 = 47; + int shiftPDP = (9 + 9 + 12); uintptr_t gpuVa = (uintptr_t(0x1) << (shiftPML4)) | (uintptr_t(0x1) << (shiftPDP)) | (uintptr_t(0x1) << (9 + 12)) | 0x100;