Files
compute-runtime/opencl/source/mem_obj/mem_obj_helper.h
Krzysztof Gibala cb8e9656ee Merge MemoryPropertiesFlags files
Move mem_properties_parser_helper files to memory_properties_flags_helpers
Rename MemoryPropertiesParser to MemoryPropertiesHelper

Related-To: NEO-4143
Change-Id: Ib35360bceff90be2383696083226f8be1e47538c
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-05-08 14:17:36 +02:00

50 lines
2.3 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/bit_helpers.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/memory_manager/unified_memory_manager.h"
#include "opencl/extensions/public/cl_ext_private.h"
#include "opencl/source/helpers/memory_properties_helpers.h"
#include "opencl/source/mem_obj/mem_obj.h"
#include "CL/cl.h"
#include "memory_properties_flags.h"
namespace NEO {
class MemObjHelper {
public:
static const uint64_t extraFlags;
static const uint64_t extraFlagsIntel;
static const uint64_t commonFlags;
static const uint64_t commonFlagsIntel;
static const uint64_t validFlagsForBuffer;
static const uint64_t validFlagsForBufferIntel;
static const uint64_t validFlagsForImage;
static const uint64_t validFlagsForImageIntel;
static bool validateMemoryPropertiesForBuffer(const MemoryProperties &memoryProperties, cl_mem_flags flags,
cl_mem_flags_intel flagsIntel, const Context &context);
static bool validateMemoryPropertiesForImage(const MemoryProperties &memoryProperties, cl_mem_flags flags,
cl_mem_flags_intel flagsIntel, cl_mem parent, const Context &context);
static AllocationProperties getAllocationPropertiesWithImageInfo(uint32_t rootDeviceIndex, ImageInfo &imgInfo, bool allocateMemory,
const MemoryProperties &memoryProperties,
const HardwareInfo &hwInfo, DeviceBitfield subDevicesBitfieldParam);
static bool checkMemFlagsForSubBuffer(cl_mem_flags flags);
static SVMAllocsManager::SvmAllocationProperties getSvmAllocationProperties(cl_mem_flags flags);
static bool isSuitableForRenderCompression(bool renderCompressed, const MemoryProperties &properties, Context &context,
bool preferCompression);
protected:
static bool validateExtraMemoryProperties(const MemoryProperties &memoryProperties, cl_mem_flags flags,
cl_mem_flags_intel flagsIntel, const Context &context);
};
} // namespace NEO