Refactor MemoryPropertiesFlags

Rename:
- MemoryPropertiesFlags to MemoryProperties
- MemoryPropertiesParser to MemoryPropertiesParserHelper
- getMemoryPropertiesFlags to getFlags
- getMemoryPropertiesFlagsIntel to getFlagsIntel
- functions involved with MemoryPropertiesFlags

Related-To: NEO-4143
Change-Id: I4eec67bba95dd5354d0df43c31e6ca724909138e
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-04-22 14:37:30 +02:00
committed by sys_ocldev
parent 9cdd0574c1
commit b0ed3b2ab1
73 changed files with 433 additions and 434 deletions

View File

@@ -12,9 +12,9 @@
namespace NEO {
bool MemoryPropertiesParser::parseMemoryProperties(const cl_mem_properties_intel *properties, MemoryPropertiesFlags &memoryProperties,
cl_mem_flags &flags, cl_mem_flags_intel &flagsIntel,
cl_mem_alloc_flags_intel &allocflags, ObjType objectType, Context &context) {
bool MemoryPropertiesParserHelper::parseMemoryProperties(const cl_mem_properties_intel *properties, MemoryProperties &memoryProperties,
cl_mem_flags &flags, cl_mem_flags_intel &flagsIntel,
cl_mem_alloc_flags_intel &allocflags, ObjType objectType, Context &context) {
if (properties == nullptr) {
return true;
}
@@ -35,13 +35,13 @@ bool MemoryPropertiesParser::parseMemoryProperties(const cl_mem_properties_intel
}
}
memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(flags, flagsIntel, allocflags);
memoryProperties = MemoryPropertiesParser::createMemoryProperties(flags, flagsIntel, allocflags);
switch (objectType) {
case MemoryPropertiesParser::ObjType::BUFFER:
case MemoryPropertiesParserHelper::ObjType::BUFFER:
return isFieldValid(flags, MemObjHelper::validFlagsForBuffer) &&
isFieldValid(flagsIntel, MemObjHelper::validFlagsForBufferIntel);
case MemoryPropertiesParser::ObjType::IMAGE:
case MemoryPropertiesParserHelper::ObjType::IMAGE:
return isFieldValid(flags, MemObjHelper::validFlagsForImage) &&
isFieldValid(flagsIntel, MemObjHelper::validFlagsForImageIntel);
default:
@@ -50,7 +50,7 @@ bool MemoryPropertiesParser::parseMemoryProperties(const cl_mem_properties_intel
return true;
}
void MemoryPropertiesParser::fillPoliciesInProperties(AllocationProperties &allocationProperties, const MemoryPropertiesFlags &memoryProperties, const HardwareInfo &hwInfo) {
void MemoryPropertiesParserHelper::fillPoliciesInProperties(AllocationProperties &allocationProperties, const MemoryProperties &memoryProperties, const HardwareInfo &hwInfo) {
fillCachePolicyInProperties(allocationProperties,
memoryProperties.flags.locallyUncachedResource,
memoryProperties.flags.readOnly,