Code cleanup - constexpr for bitness ults

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2021-05-24 13:49:09 +00:00
committed by Compute-Runtime-Automation
parent 72a0621dc2
commit 7fdab76d96
19 changed files with 42 additions and 48 deletions

View File

@ -435,7 +435,7 @@ TEST_F(DeviceGetCapsTest, givenForce32bitAddressingWhenCapsAreCreatedThenDeviceR
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(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);

View File

@ -126,7 +126,7 @@ TEST_F(DeviceTest, WhenDeviceIsCreatedThenOsTimeIsNotNull) {
TEST_F(DeviceTest, GivenDebugVariableForcing32BitAllocationsWhenDeviceIsCreatedThenMemoryManagerHasForce32BitFlagSet) {
DebugManager.flags.Force32bitAddressing.set(true);
auto pDevice = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
if (is64bit) {
if constexpr (is64bit) {
EXPECT_TRUE(pDevice->getDeviceInfo().force32BitAddressess);
EXPECT_TRUE(pDevice->getMemoryManager()->peekForce32BitAllocations());
} else {