From ded1a445f82f5bdcecf044aa9c3bb55364b711df Mon Sep 17 00:00:00 2001 From: "Stefanowski, Adam" Date: Mon, 4 Jun 2018 10:20:09 +0200 Subject: [PATCH] Group gen specific small cpp files together part 3 Change-Id: Id49acae4f9748a1db51c1a4051992269e21f1048 --- offline_compiler/CMakeLists.txt | 7 +++-- runtime/enable_gens.cmake | 4 +-- runtime/gen8/enable_bdw.cpp | 29 -------------------- runtime/gen8/enable_gen8.cpp | 33 +++++++++++++++++++++++ runtime/gen9/enable_bxt.cpp | 29 -------------------- runtime/gen9/enable_cfl.cpp | 29 -------------------- runtime/gen9/enable_gen9.cpp | 45 ++++++++++++++++++++++++++++++++ runtime/gen9/enable_glk.cpp | 29 -------------------- runtime/gen9/enable_kbl.cpp | 29 -------------------- runtime/gen9/enable_skl.cpp | 29 -------------------- unit_tests/libult/CMakeLists.txt | 7 +---- 11 files changed, 83 insertions(+), 187 deletions(-) delete mode 100644 runtime/gen8/enable_bdw.cpp create mode 100644 runtime/gen8/enable_gen8.cpp delete mode 100644 runtime/gen9/enable_bxt.cpp delete mode 100644 runtime/gen9/enable_cfl.cpp create mode 100644 runtime/gen9/enable_gen9.cpp delete mode 100644 runtime/gen9/enable_glk.cpp delete mode 100644 runtime/gen9/enable_kbl.cpp delete mode 100644 runtime/gen9/enable_skl.cpp diff --git a/offline_compiler/CMakeLists.txt b/offline_compiler/CMakeLists.txt index cce3440f6a..4287ec9ecf 100644 --- a/offline_compiler/CMakeLists.txt +++ b/offline_compiler/CMakeLists.txt @@ -55,10 +55,7 @@ set(RUNTIME_GENX_CPP_FILES ) macro(macro_for_each_platform) - list(APPEND CLOC_SRCS_LIB - ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/hw_info_${PLATFORM_IT_LOWER}.inl - ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_${PLATFORM_IT_LOWER}.cpp - ) + list(APPEND CLOC_SRCS_LIB ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/hw_info_${PLATFORM_IT_LOWER}.inl) endmacro() macro(macro_for_each_gen) @@ -69,6 +66,8 @@ macro(macro_for_each_gen) endif() endforeach() apply_macro_for_each_platform() + + list(APPEND CLOC_SRCS_LIB ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_${GEN_TYPE_LOWER}.cpp) endmacro() apply_macro_for_each_gen("SUPPORTED") diff --git a/runtime/enable_gens.cmake b/runtime/enable_gens.cmake index bc21398341..ab4e2b7c9f 100644 --- a/runtime/enable_gens.cmake +++ b/runtime/enable_gens.cmake @@ -74,9 +74,6 @@ macro(macro_for_each_platform) endforeach() list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_LINUX ${GENX_PREFIX}/linux/hw_info_config_${PLATFORM_IT_LOWER}.inl) - - # Enable platform - list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_${PLATFORM_IT_LOWER}.cpp) endmacro() macro(macro_for_each_gen) @@ -102,6 +99,7 @@ macro(macro_for_each_gen) list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_family_full_${GEN_TYPE_LOWER}.cpp) list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_hw_info_config_${GEN_TYPE_LOWER}.cpp) + list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_${GEN_TYPE_LOWER}.cpp) list(APPEND RUNTIME_SRCS_GENX_ALL_BASE ${RUNTIME_SRCS_${GEN_TYPE}_H_BASE}) list(APPEND RUNTIME_SRCS_GENX_ALL_BASE ${RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE}) diff --git a/runtime/gen8/enable_bdw.cpp b/runtime/gen8/enable_bdw.cpp deleted file mode 100644 index 022a1aa93f..0000000000 --- a/runtime/gen8/enable_bdw.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 - 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/runtime/gen8/enable_gen8.cpp b/runtime/gen8/enable_gen8.cpp new file mode 100644 index 0000000000..fa560d2bae --- /dev/null +++ b/runtime/gen8/enable_gen8.cpp @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2018, Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "hw_cmds.h" +#include "runtime/os_interface/hw_info_config.h" +#include "runtime/helpers/enable_product.inl" + +namespace OCLRT { + +#ifdef SUPPORT_BDW +static EnableGfxProductHw enableGfxProductHwBDW; +#endif + +} // namespace OCLRT \ No newline at end of file diff --git a/runtime/gen9/enable_bxt.cpp b/runtime/gen9/enable_bxt.cpp deleted file mode 100644 index 9ec63b7007..0000000000 --- a/runtime/gen9/enable_bxt.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 - 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/runtime/gen9/enable_cfl.cpp b/runtime/gen9/enable_cfl.cpp deleted file mode 100644 index 8da880e9c0..0000000000 --- a/runtime/gen9/enable_cfl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/runtime/gen9/enable_gen9.cpp b/runtime/gen9/enable_gen9.cpp new file mode 100644 index 0000000000..da75eecc50 --- /dev/null +++ b/runtime/gen9/enable_gen9.cpp @@ -0,0 +1,45 @@ +/* +* Copyright (c) 2018, Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "hw_cmds.h" +#include "runtime/os_interface/hw_info_config.h" +#include "runtime/helpers/enable_product.inl" + +namespace OCLRT { + +#ifdef SUPPORT_BXT +static EnableGfxProductHw enableGfxProductHwBXT; +#endif +#ifdef SUPPORT_CFL +static EnableGfxProductHw enableGfxProductHwCFL; +#endif +#ifdef SUPPORT_GLK +static EnableGfxProductHw enableGfxProductHwGLK; +#endif +#ifdef SUPPORT_KBL +static EnableGfxProductHw enableGfxProductHwKBL; +#endif +#ifdef SUPPORT_SKL +static EnableGfxProductHw enableGfxProductHwSKL; +#endif + +} // namespace OCLRT diff --git a/runtime/gen9/enable_glk.cpp b/runtime/gen9/enable_glk.cpp deleted file mode 100644 index 3b4270d0de..0000000000 --- a/runtime/gen9/enable_glk.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 - 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/runtime/gen9/enable_kbl.cpp b/runtime/gen9/enable_kbl.cpp deleted file mode 100644 index d6678e7caa..0000000000 --- a/runtime/gen9/enable_kbl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 - 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/runtime/gen9/enable_skl.cpp b/runtime/gen9/enable_skl.cpp deleted file mode 100644 index 1727466ad1..0000000000 --- a/runtime/gen9/enable_skl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 - 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "hw_cmds.h" -#include "runtime/os_interface/hw_info_config.h" -#include "runtime/helpers/enable_product.inl" - -namespace OCLRT { -static EnableGfxProductHw enableGfxProductHw; -} // namespace OCLRT diff --git a/unit_tests/libult/CMakeLists.txt b/unit_tests/libult/CMakeLists.txt index 2bc2bef954..12c2ab8dab 100644 --- a/unit_tests/libult/CMakeLists.txt +++ b/unit_tests/libult/CMakeLists.txt @@ -18,11 +18,6 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -macro(macro_for_each_platform) - list (APPEND IGDRCL_SRCS_ENABLE_TESTED_HW - ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_${PLATFORM_IT_LOWER}.cpp - ) -endmacro() macro(macro_for_each_gen) list(APPEND IGDRCL_SRCS_ENABLE_TESTED_HW ${IGDRCL_SOURCE_DIR}/unit_tests/${GEN_TYPE_LOWER}/cmd_parse_${GEN_TYPE_LOWER}.cpp @@ -30,8 +25,8 @@ macro(macro_for_each_gen) ${IGDRCL_SOURCE_DIR}/unit_tests/libult/${GEN_TYPE_LOWER}.cpp ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_family_full_${GEN_TYPE_LOWER}.cpp ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_hw_info_config_${GEN_TYPE_LOWER}.cpp + ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_${GEN_TYPE_LOWER}.cpp ) - apply_macro_for_each_platform() endmacro() apply_macro_for_each_gen("TESTED")