Move enable_product.inl to shared

extract api agnostic validators to shared
remove not needed opencl includes from neo shared


Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-10-12 18:58:51 +00:00
committed by Compute-Runtime-Automation
parent 10e4b54986
commit b1df167632
31 changed files with 50 additions and 58 deletions

View File

@@ -40,6 +40,7 @@ set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.h
${CMAKE_CURRENT_SOURCE_DIR}/enable_product.inl
${CMAKE_CURRENT_SOURCE_DIR}/engine_control.h
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}engine_node_helper_extra.cpp
@@ -122,6 +123,7 @@ set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/topology_map.h
${CMAKE_CURRENT_SOURCE_DIR}/uint16_avx2.h
${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4.h
${CMAKE_CURRENT_SOURCE_DIR}/validators.h
${CMAKE_CURRENT_SOURCE_DIR}/vec.h
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds.h
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}engine_group_types.h

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/hw_info.h"
namespace NEO {
template <PRODUCT_FAMILY gfxProduct>
struct EnableGfxProductHw {
typedef typename HwMapper<gfxProduct>::GfxProduct GfxProduct;
enum { gfxFamily = HwMapper<gfxProduct>::gfxFamily };
EnableGfxProductHw() {
EnableGfxFamilyHw<static_cast<GFXCORE_FAMILY>(gfxFamily)> enableFamily;
hardwarePrefix[gfxProduct] = HwMapper<gfxProduct>::abbreviation;
defaultHardwareInfoConfigTable[gfxProduct] = GfxProduct::defaultHardwareInfoConfig;
hardwareInfoTable[gfxProduct] = &GfxProduct::hwInfo;
hardwareInfoSetup[gfxProduct] = GfxProduct::setupHardwareInfo;
}
};
} // namespace NEO

View File

@@ -0,0 +1,22 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <utility>
namespace NEO {
template <typename T = void>
bool areNotNullptr() {
return true;
}
template <typename T, typename... RT>
bool areNotNullptr(T t, RT... rt) {
return (t != nullptr) && areNotNullptr<RT...>(rt...);
}
} // namespace NEO