From 93e941fd73764cf80154e80005f3eb677c57f8bc Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Fri, 19 Jan 2024 11:05:30 +0000 Subject: [PATCH] refactor: simplify engine mapping array Signed-off-by: Mateusz Jablonski --- shared/source/os_interface/linux/engine_info.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/shared/source/os_interface/linux/engine_info.cpp b/shared/source/os_interface/linux/engine_info.cpp index 2993764ab203f..cd61fa9b84bbc 100644 --- a/shared/source/os_interface/linux/engine_info.cpp +++ b/shared/source/os_interface/linux/engine_info.cpp @@ -17,14 +17,11 @@ #include "shared/source/os_interface/linux/drm_wrappers.h" #include "shared/source/os_interface/product_helper.h" -#include -#include - namespace NEO { namespace DrmEngineMappingHelper { -constexpr std::array engineMapping = {{aub_stream::ENGINE_BCS, aub_stream::ENGINE_BCS1, aub_stream::ENGINE_BCS2, - aub_stream::ENGINE_BCS3, aub_stream::ENGINE_BCS4, aub_stream::ENGINE_BCS5, - aub_stream::ENGINE_BCS6, aub_stream::ENGINE_BCS7, aub_stream::ENGINE_BCS8}}; +constexpr aub_stream::EngineType engineMapping[] = {aub_stream::ENGINE_BCS, aub_stream::ENGINE_BCS1, aub_stream::ENGINE_BCS2, + aub_stream::ENGINE_BCS3, aub_stream::ENGINE_BCS4, aub_stream::ENGINE_BCS5, + aub_stream::ENGINE_BCS6, aub_stream::ENGINE_BCS7, aub_stream::ENGINE_BCS8}; // 3 types of copy engines: // - Main - BCS (legacy, aka. BCS0) @@ -51,7 +48,7 @@ void assignLinkCopyEngine(std::vector &tileToEn } auto getCopyEnginesMappingIterator(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) { - auto mappingCopyEngineIt = DrmEngineMappingHelper::engineMapping.begin(); + auto mappingCopyEngineIt = DrmEngineMappingHelper::engineMapping; if (const auto defaultCopyEngine = rootDeviceEnvironment.getProductHelper().getDefaultCopyEngine(); defaultCopyEngine != *mappingCopyEngineIt) { mappingCopyEngineIt++; } // Note that BCS0 may not be enabled