refactor: adjust code to compile with c++20

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-11-28 15:49:15 +00:00
committed by Compute-Runtime-Automation
parent a9c0199dfe
commit 5e1fa75676
29 changed files with 55 additions and 43 deletions

View File

@@ -8,7 +8,6 @@ target_sources(neo_libult_common PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_3d_state_btd.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_base.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_base_mi_arb.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_compute_mi_arb.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_compute_mode.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_compute_walker.inl

View File

@@ -1,16 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
template <>
MI_ARB_CHECK *genCmdCast<MI_ARB_CHECK *>(void *buffer) {
auto pCmd = reinterpret_cast<MI_ARB_CHECK *>(buffer);
return MI_ARB_CHECK::MI_INSTRUCTION_TYPE_MI_INSTRUCTION == pCmd->TheStructure.Common.MiInstructionType &&
MI_ARB_CHECK::MI_INSTRUCTION_OPCODE_MI_ARB_CHECK == pCmd->TheStructure.Common.MiInstructionOpcode
? pCmd
: nullptr;
}

View File

@@ -1,10 +1,13 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
using namespace NEO;
using MI_ARB_CHECK = GenStruct::MI_ARB_CHECK;
template <>
MI_ARB_CHECK *genCmdCast<MI_ARB_CHECK *>(void *buffer) {
auto pCmd = reinterpret_cast<MI_ARB_CHECK *>(buffer);

View File

@@ -1,10 +1,12 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
using namespace NEO;
using MI_ARB_CHECK = GenStruct::MI_ARB_CHECK;
template <>
MI_ARB_CHECK *genCmdCast<MI_ARB_CHECK *>(void *buffer) {
auto pCmd = reinterpret_cast<MI_ARB_CHECK *>(buffer);

View File

@@ -7,7 +7,6 @@
#include "shared/test/common/cmd_parse/cmd_parse_3d_state_btd.inl"
#include "shared/test/common/cmd_parse/cmd_parse_base.inl"
#include "shared/test/common/cmd_parse/cmd_parse_compute_mi_arb.inl"
#include "shared/test/common/cmd_parse/cmd_parse_compute_mode.inl"
#include "shared/test/common/cmd_parse/cmd_parse_compute_walker.inl"
#include "shared/test/common/cmd_parse/cmd_parse_sip.inl"

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/gen12lp/hw_cmds_base.h"
using GenStruct = NEO::Gen12Lp;
using GenGfxFamily = NEO::Gen12LpFamily;
@@ -127,6 +128,7 @@ const char *CmdParse<GenGfxFamily>::getCommandNameHwSpecific(void *cmd) {
template struct CmdParse<GenGfxFamily>;
namespace NEO {
template void HardwareParse::findHardwareCommands<Gen12LpFamily>();
template void HardwareParse::findHardwareCommands<Gen12LpFamily>(IndirectHeap *);
template const void *HardwareParse::getStatelessArgumentPointer<Gen12LpFamily>(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex);

View File

@@ -74,7 +74,7 @@ const char *CmdParse<GenGfxFamily>::getAdditionalCommandName(void *cmd) {
return "UNKNOWN";
}
#include "shared/test/common/cmd_parse/cmd_parse_compute_mi_arb.inl"
#include "shared/test/common/cmd_parse/cmd_parse_xe_hpg_and_later.inl"
#include "shared/test/common/cmd_parse/hw_parse.h"
#include "shared/test/common/cmd_parse/hw_parse_base.inl"

View File

@@ -65,7 +65,7 @@ const char *CmdParse<GenGfxFamily>::getAdditionalCommandName(void *cmd) {
return "UNKNOWN";
}
#include "shared/test/common/cmd_parse/cmd_parse_compute_mi_arb.inl"
#include "shared/test/common/cmd_parse/cmd_parse_xe_hpg_and_later.inl"
#include "shared/test/common/cmd_parse/hw_parse.h"
#include "shared/test/common/cmd_parse/hw_parse_base.inl"

View File

@@ -52,7 +52,7 @@ const char *CmdParse<GenGfxFamily>::getAdditionalCommandName(void *cmd) {
return "UNKNOWN";
}
#include "shared/test/common/cmd_parse/cmd_parse_compute_mi_arb.inl"
#include "shared/test/common/cmd_parse/cmd_parse_xe_hpg_and_later.inl"
#include "shared/test/common/cmd_parse/hw_parse_base.inl"
#include "shared/test/common/cmd_parse/hw_parse_xe_hpg_and_later.inl"

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/resource_info.h"