Remove OCL object from MemoryProperties 8/n

Refactor MemoryPropertiesFlags to bitfield

Related-To: NEO-3132
Change-Id: I7092b16d15cec962e94c992696bd9845ce86f642
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2019-08-22 12:31:07 +02:00
committed by sys_ocldev
parent 90266b4a37
commit 84c801e28b
8 changed files with 77 additions and 80 deletions

View File

@@ -34,22 +34,22 @@ TEST(MemObjHelper, givenClMemForceLinearStorageFlagWhenCheckForLinearStorageForc
properties.flags |= CL_MEM_FORCE_LINEAR_STORAGE_INTEL;
properties.flags_intel = 0;
memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
EXPECT_TRUE(memoryProperties.forceLinearStorage);
EXPECT_TRUE(memoryProperties.flags.forceLinearStorage);
properties.flags = 0;
properties.flags_intel |= CL_MEM_FORCE_LINEAR_STORAGE_INTEL;
memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
EXPECT_TRUE(memoryProperties.forceLinearStorage);
EXPECT_TRUE(memoryProperties.flags.forceLinearStorage);
properties.flags |= CL_MEM_FORCE_LINEAR_STORAGE_INTEL;
properties.flags_intel |= CL_MEM_FORCE_LINEAR_STORAGE_INTEL;
memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
EXPECT_TRUE(memoryProperties.forceLinearStorage);
EXPECT_TRUE(memoryProperties.flags.forceLinearStorage);
properties.flags = 0;
properties.flags_intel = 0;
memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
EXPECT_FALSE(memoryProperties.forceLinearStorage);
EXPECT_FALSE(memoryProperties.flags.forceLinearStorage);
}
TEST(MemObjHelper, givenValidPropertiesWhenValidatingMemoryPropertiesThenTrueIsReturned) {