mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
10e4b54986
commit
b1df167632
@@ -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
|
||||
|
||||
25
shared/source/helpers/enable_product.inl
Normal file
25
shared/source/helpers/enable_product.inl
Normal 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
|
||||
22
shared/source/helpers/validators.h
Normal file
22
shared/source/helpers/validators.h
Normal 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
|
||||
Reference in New Issue
Block a user