diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/CMake Overview" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/CMake Overview" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/slnx.sqlite" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/slnx.sqlite" new file mode 100644 index 0000000000000000000000000000000000000000..2697cdc9364044bee38ec6a128dcfa913584b165 Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/slnx.sqlite" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/FileContentIndex/4eab8299-e877-4476-a9fa-700c0c910d6d.vsidx" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/FileContentIndex/4eab8299-e877-4476-a9fa-700c0c910d6d.vsidx" new file mode 100644 index 0000000000000000000000000000000000000000..ec6cf89d15308e2c6baa95219bb8df1800a9dbae Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/FileContentIndex/4eab8299-e877-4476-a9fa-700c0c910d6d.vsidx" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/FileContentIndex/read.lock" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/FileContentIndex/read.lock" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/.suo" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/.suo" new file mode 100644 index 0000000000000000000000000000000000000000..2458ddca533c3fbd5fcaf06209d5a8c9daf4a956 Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/.suo" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/Browse.VC.db" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/Browse.VC.db" new file mode 100644 index 0000000000000000000000000000000000000000..121445e80c051724ee957984cc2af461636d3697 Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/Browse.VC.db" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/ipch/AutoPCH/184f3c044cd8d14a/POINT.ipch" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/ipch/AutoPCH/184f3c044cd8d14a/POINT.ipch" new file mode 100644 index 0000000000000000000000000000000000000000..66e40d66971726948e86a30c600354089a1a0a14 Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/.vs/version2/v17/ipch/AutoPCH/184f3c044cd8d14a/POINT.ipch" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeCache.txt" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeCache.txt" new file mode 100644 index 0000000000000000000000000000000000000000..4eb1e37c4783b771de1e7d4650838c7c7451c200 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeCache.txt" @@ -0,0 +1,321 @@ +# This is the CMakeCache file. +# For build in directory: c:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug +# It was generated by CMake: D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Value Computed by CMake +Assignment3_BINARY_DIR:STATIC=C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug + +//Value Computed by CMake +Assignment3_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +Assignment3_SOURCE_DIR:STATIC=C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2 + +//Path to a program. +CMAKE_AR:FILEPATH=D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/lib.exe + +//No help, variable specified on the command line. +CMAKE_BUILD_TYPE:STRING=Debug + +//CXX compiler +CMAKE_CXX_COMPILER:STRING=D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1 + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG + +//Libraries linked by default with all C++ applications. +CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//No help, variable specified on the command line. +CMAKE_INSTALL_PREFIX:PATH=C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/install/x64-Debug + +//Path to a program. +CMAKE_LINKER:FILEPATH=D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/link.exe + +//make program +CMAKE_MAKE_PROGRAM:FILEPATH=D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Path to a program. +CMAKE_MT:FILEPATH=D:/Windows Kits/10/bin/10.0.19041.0/x64/mt.exe + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=Assignment3 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION:STATIC=0.2.0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MAJOR:STATIC=0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MINOR:STATIC=2 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_PATCH:STATIC=0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_TWEAK:STATIC= + +//RC compiler +CMAKE_RC_COMPILER:FILEPATH=D:/Windows Kits/10/bin/10.0.19041.0/x64/rc.exe + +//Flags for Windows Resource Compiler during all build types. +CMAKE_RC_FLAGS:STRING=-DWIN32 + +//Flags for Windows Resource Compiler during DEBUG builds. +CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG + +//Flags for Windows Resource Compiler during MINSIZEREL builds. +CMAKE_RC_FLAGS_MINSIZEREL:STRING= + +//Flags for Windows Resource Compiler during RELEASE builds. +CMAKE_RC_FLAGS_RELEASE:STRING= + +//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. +CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=22040401 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES +CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MT +CMAKE_MT-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//noop for ranlib +CMAKE_RANLIB:INTERNAL=: +//ADVANCED property for variable: CMAKE_RC_COMPILER +CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_RC_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS +CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG +CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL +CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE +CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO +CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeCXXCompiler.cmake" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeCXXCompiler.cmake" new file mode 100644 index 0000000000000000000000000000000000000000..9b3f4a0cbdb9dc6ff63f59df0e387e0c79fcddac --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeCXXCompiler.cmake" @@ -0,0 +1,83 @@ +set(CMAKE_CXX_COMPILER "D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "MSVC") +set(CMAKE_CXX_COMPILER_VERSION "19.32.31332.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "OFF") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") +set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23") + +set(CMAKE_CXX_PLATFORM_ID "Windows") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") +set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID x64) + +set(MSVC_CXX_ARCHITECTURE_ID x64) + +set(CMAKE_AR "D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/lib.exe") +set(CMAKE_CXX_COMPILER_AR "") +set(CMAKE_RANLIB ":") +set(CMAKE_CXX_COMPILER_RANLIB "") +set(CMAKE_LINKER "D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/link.exe") +set(CMAKE_MT "D:/Windows Kits/10/bin/10.0.19041.0/x64/mt.exe") +set(CMAKE_COMPILER_IS_GNUCXX ) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "") +set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "注意: 包含文件: ") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeDetermineCompilerABI_CXX.bin" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeDetermineCompilerABI_CXX.bin" new file mode 100644 index 0000000000000000000000000000000000000000..46f4c80dda6aed74d06abc74963df64e16e101a9 Binary files /dev/null and "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeDetermineCompilerABI_CXX.bin" differ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeRCCompiler.cmake" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeRCCompiler.cmake" new file mode 100644 index 0000000000000000000000000000000000000000..fbc754dceca35931841edf567b17a1700c146544 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeRCCompiler.cmake" @@ -0,0 +1,6 @@ +set(CMAKE_RC_COMPILER "D:/Windows Kits/10/bin/10.0.19041.0/x64/rc.exe") +set(CMAKE_RC_COMPILER_ARG1 "") +set(CMAKE_RC_COMPILER_LOADED 1) +set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) +set(CMAKE_RC_OUTPUT_EXTENSION .res) +set(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeSystem.cmake" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeSystem.cmake" new file mode 100644 index 0000000000000000000000000000000000000000..909db20dc648296c09d32fc1d47c3476c1dc5b8a --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CMakeSystem.cmake" @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Windows-10.0.19045") +set(CMAKE_HOST_SYSTEM_NAME "Windows") +set(CMAKE_HOST_SYSTEM_VERSION "10.0.19045") +set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") + + + +set(CMAKE_SYSTEM "Windows-10.0.19045") +set(CMAKE_SYSTEM_NAME "Windows") +set(CMAKE_SYSTEM_VERSION "10.0.19045") +set(CMAKE_SYSTEM_PROCESSOR "AMD64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CompilerIdCXX/CMakeCXXCompilerId.cpp" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CompilerIdCXX/CMakeCXXCompilerId.cpp" new file mode 100644 index 0000000000000000000000000000000000000000..25c62a8c3cb40764ac539370df9ec347bdd99b79 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CompilerIdCXX/CMakeCXXCompilerId.cpp" @@ -0,0 +1,791 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/CMakeOutput.log" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/CMakeOutput.log" new file mode 100644 index 0000000000000000000000000000000000000000..6c464684a2a42d74f8362247be37b7ad50f1f39d --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/CMakeOutput.log" @@ -0,0 +1,33 @@ +The system is: Windows - 10.0.19045 - AMD64 +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: D:/software/Visual Studio 2022/Visual Studio IDE/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe +Build flags: +Id flags: + +The output was: +0 +用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.32.31332 版 +版权所有(C) Microsoft Corporation。保留所有权利。 + +CMakeCXXCompilerId.cpp +Microsoft (R) Incremental Linker Version 14.32.31332.0 +Copyright (C) Microsoft Corporation. All rights reserved. + +/out:CMakeCXXCompilerId.exe +CMakeCXXCompilerId.obj + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe" + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj" + +The CXX compiler identification is MSVC, found in "C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/CMakeFiles/3.22.22040401-MSVC_2/CompilerIdCXX/CMakeCXXCompilerId.exe" + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/CMakeFiles/CMakeTmp + +Run Build Command(s):D:/software/Visual Studio 2022/Visual Studio IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_52f5a && [1/2] Building CXX object CMakeFiles\cmTC_52f5a.dir\CMakeCXXCompilerABI.cpp.obj +[2/2] Linking CXX executable cmTC_52f5a.exe + + + diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/foo.h" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/foo.h" new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/foo.h" @@ -0,0 +1 @@ + diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/main.c" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/main.c" new file mode 100644 index 0000000000000000000000000000000000000000..cd3cbc1ff2bb98932520c792d7f0a82e1e877d80 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/ShowIncludes/main.c" @@ -0,0 +1,2 @@ +#include "foo.h" +int main(){} diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/TargetDirectories.txt" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/TargetDirectories.txt" new file mode 100644 index 0000000000000000000000000000000000000000..9518252366b27e7a26768c1ae25462e75982a6ae --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/TargetDirectories.txt" @@ -0,0 +1,6 @@ +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/CMakeFiles/Assignment3.dir +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/CMakeFiles/edit_cache.dir +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/CMakeFiles/rebuild_cache.dir +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/src/CMakeFiles/MyAstar.dir +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/src/CMakeFiles/edit_cache.dir +C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/src/CMakeFiles/rebuild_cache.dir diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/cmake.check_cache" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/cmake.check_cache" new file mode 100644 index 0000000000000000000000000000000000000000..3dccd731726d7faa8b29d8d7dba3b981a53ca497 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/cmake.check_cache" @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/rules.ninja" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/rules.ninja" new file mode 100644 index 0000000000000000000000000000000000000000..ad13ac915c27dda74271b501bacb6e0a8b2c0f63 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/CMakeFiles/rules.ninja" @@ -0,0 +1,87 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the rules used to get the outputs files +# built from the input files. +# It is included in the main 'build.ninja'. + +# ============================================================================= +# Project: Assignment3 +# Configurations: Debug +# ============================================================================= +# ============================================================================= + +############################################# +# localized /showIncludes string + +msvc_deps_prefix = 注意: 包含文件: + + +############################################# +# Rule for compiling CXX files. + +rule CXX_COMPILER__Assignment3_Debug + deps = msvc + command = "D:\software\Visual Studio 2022\Visual Studio IDE\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\cl.exe" /nologo /TP $DEFINES $INCLUDES $FLAGS /showIncludes /Fo$out /Fd$TARGET_COMPILE_PDB /FS -c $in + description = Building CXX object $out + + +############################################# +# Rule for linking CXX executable. + +rule CXX_EXECUTABLE_LINKER__Assignment3_Debug + command = cmd.exe /C "$PRE_LINK && "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=$OBJECT_DIR --rc="D:\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests $MANIFESTS -- "D:\software\Visual Studio 2022\Visual Studio IDE\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\link.exe" /nologo $in /out:$TARGET_FILE /implib:$TARGET_IMPLIB /pdb:$TARGET_PDB /version:0.0 $LINK_FLAGS $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking CXX executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for running custom commands. + +rule CUSTOM_COMMAND + command = $COMMAND + description = $DESC + + +############################################# +# Rule for compiling CXX files. + +rule CXX_COMPILER__MyAstar_Debug + deps = msvc + command = "D:\software\Visual Studio 2022\Visual Studio IDE\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\cl.exe" /nologo /TP $DEFINES $INCLUDES $FLAGS /showIncludes /Fo$out /Fd$TARGET_COMPILE_PDB /FS -c $in + description = Building CXX object $out + + +############################################# +# Rule for linking CXX static library. + +rule CXX_STATIC_LIBRARY_LINKER__MyAstar_Debug + command = cmd.exe /C "$PRE_LINK && "D:\software\Visual Studio 2022\Visual Studio IDE\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\lib.exe" /nologo $LINK_FLAGS /out:$TARGET_FILE $in && $POST_BUILD" + description = Linking CXX static library $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for re-running cmake. + +rule RERUN_CMAKE + command = "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2 -BC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug + description = Re-running CMake... + generator = 1 + + +############################################# +# Rule for cleaning all built files. + +rule CLEAN + command = "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" $FILE_ARG -t clean $TARGETS + description = Cleaning all built files... + + +############################################# +# Rule for printing all primary targets available. + +rule HELP + command = "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" -t targets + description = All primary targets available: + diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/Testing/Temporary/LastTest.log" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/Testing/Temporary/LastTest.log" new file mode 100644 index 0000000000000000000000000000000000000000..4bcef176ff694708377ffb36751dd91e60c068a4 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/Testing/Temporary/LastTest.log" @@ -0,0 +1,3 @@ +Start testing: Jul 23 19:34 й׼ʱ +---------------------------------------------------------- +End testing: Jul 23 19:34 й׼ʱ diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/VSInheritEnvironments.txt" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/VSInheritEnvironments.txt" new file mode 100644 index 0000000000000000000000000000000000000000..f8cc9d8acececa5889772afcf808dd35dc59a7ed --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/VSInheritEnvironments.txt" @@ -0,0 +1 @@ +msvc_x64_x64 \ No newline at end of file diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/build.ninja" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/build.ninja" new file mode 100644 index 0000000000000000000000000000000000000000..5cd256a337e482228d675c8b0ddb36ad2e4a22ba --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/build.ninja" @@ -0,0 +1,247 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the build statements describing the +# compilation DAG. + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# +# Which is the root file. +# ============================================================================= + +# ============================================================================= +# Project: Assignment3 +# Configurations: Debug +# ============================================================================= + +############################################# +# Minimal version of Ninja required by this file + +ninja_required_version = 1.5 + + +############################################# +# Set configuration variable for custom commands. + +CONFIGURATION = Debug +# ============================================================================= +# Include auxiliary files. + + +############################################# +# Include rules file. + +include CMakeFiles\rules.ninja + +# ============================================================================= + +############################################# +# Logical path to working directory; prefix for absolute paths. + +cmake_ninja_workdir = C$:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug\ +# ============================================================================= +# Object build statements for EXECUTABLE target Assignment3 + + +############################################# +# Order-only phony target for Assignment3 + +build cmake_object_order_depends_target_Assignment3: phony || cmake_object_order_depends_target_MyAstar + +build CMakeFiles\Assignment3.dir\test\MyAstar_test.cpp.obj: CXX_COMPILER__Assignment3_Debug C$:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\test\MyAstar_test.cpp || cmake_object_order_depends_target_Assignment3 + FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + INCLUDES = -IC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\include + OBJECT_DIR = CMakeFiles\Assignment3.dir + OBJECT_FILE_DIR = CMakeFiles\Assignment3.dir\test + TARGET_COMPILE_PDB = CMakeFiles\Assignment3.dir\ + TARGET_PDB = ..\..\..\build\Assignment3.pdb + + +# ============================================================================= +# Link build statements for EXECUTABLE target Assignment3 + + +############################################# +# Link the executable ..\..\..\build\Assignment3.exe + +build ..\..\..\build\Assignment3.exe: CXX_EXECUTABLE_LINKER__Assignment3_Debug CMakeFiles\Assignment3.dir\test\MyAstar_test.cpp.obj | src\MyAstar.lib || src\MyAstar.lib + FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + LINK_FLAGS = /machine:x64 /debug /INCREMENTAL /subsystem:console + LINK_LIBRARIES = src\MyAstar.lib libgtest.a.lib libgtest_main.a.lib pthread.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib + OBJECT_DIR = CMakeFiles\Assignment3.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_COMPILE_PDB = CMakeFiles\Assignment3.dir\ + TARGET_FILE = ..\..\..\build\Assignment3.exe + TARGET_IMPLIB = ..\..\..\build\Assignment3.lib + TARGET_PDB = ..\..\..\build\Assignment3.pdb + + +############################################# +# Utility command for edit_cache + +build CMakeFiles\edit_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug && "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E echo "No interactive CMake dialog available."" + DESC = No interactive CMake dialog available... + restat = 1 + +build edit_cache: phony CMakeFiles\edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build CMakeFiles\rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug && "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2 -BC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug" + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build rebuild_cache: phony CMakeFiles\rebuild_cache.util + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# C:/Users/ռ/Desktop/PCL/iTraining/C++/codes/2023-07//Assignment3/version2/CMakeLists.txt +# ============================================================================= + +# ============================================================================= +# Object build statements for STATIC_LIBRARY target MyAstar + + +############################################# +# Order-only phony target for MyAstar + +build cmake_object_order_depends_target_MyAstar: phony || src\CMakeFiles\MyAstar.dir + +build src\CMakeFiles\MyAstar.dir\astar.cpp.obj: CXX_COMPILER__MyAstar_Debug C$:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\src\astar.cpp || cmake_object_order_depends_target_MyAstar + FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + INCLUDES = -IC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\include + OBJECT_DIR = src\CMakeFiles\MyAstar.dir + OBJECT_FILE_DIR = src\CMakeFiles\MyAstar.dir + TARGET_COMPILE_PDB = src\CMakeFiles\MyAstar.dir\MyAstar.pdb + TARGET_PDB = src\MyAstar.pdb + +build src\CMakeFiles\MyAstar.dir\point.cpp.obj: CXX_COMPILER__MyAstar_Debug C$:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\src\point.cpp || cmake_object_order_depends_target_MyAstar + FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + INCLUDES = -IC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\include + OBJECT_DIR = src\CMakeFiles\MyAstar.dir + OBJECT_FILE_DIR = src\CMakeFiles\MyAstar.dir + TARGET_COMPILE_PDB = src\CMakeFiles\MyAstar.dir\MyAstar.pdb + TARGET_PDB = src\MyAstar.pdb + +build src\CMakeFiles\MyAstar.dir\testmap.cpp.obj: CXX_COMPILER__MyAstar_Debug C$:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\src\testmap.cpp || cmake_object_order_depends_target_MyAstar + FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + INCLUDES = -IC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\include + OBJECT_DIR = src\CMakeFiles\MyAstar.dir + OBJECT_FILE_DIR = src\CMakeFiles\MyAstar.dir + TARGET_COMPILE_PDB = src\CMakeFiles\MyAstar.dir\MyAstar.pdb + TARGET_PDB = src\MyAstar.pdb + + +# ============================================================================= +# Link build statements for STATIC_LIBRARY target MyAstar + + +############################################# +# Link the static library src\MyAstar.lib + +build src\MyAstar.lib: CXX_STATIC_LIBRARY_LINKER__MyAstar_Debug src\CMakeFiles\MyAstar.dir\astar.cpp.obj src\CMakeFiles\MyAstar.dir\point.cpp.obj src\CMakeFiles\MyAstar.dir\testmap.cpp.obj + LANGUAGE_COMPILE_FLAGS = /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 + LINK_FLAGS = /machine:x64 + OBJECT_DIR = src\CMakeFiles\MyAstar.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_COMPILE_PDB = src\CMakeFiles\MyAstar.dir\MyAstar.pdb + TARGET_FILE = src\MyAstar.lib + TARGET_PDB = src\MyAstar.pdb + + +############################################# +# Utility command for edit_cache + +build src\CMakeFiles\edit_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug\src && "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E echo "No interactive CMake dialog available."" + DESC = No interactive CMake dialog available... + restat = 1 + +build src\edit_cache: phony src\CMakeFiles\edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build src\CMakeFiles\rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug\src && "D:\software\Visual Studio 2022\Visual Studio IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --regenerate-during-build -SC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2 -BC:\Users\ռ\Desktop\PCL\iTraining\C++\codes\2023-07\\Assignment3\version2\out\build\x64-Debug" + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build src\rebuild_cache: phony src\CMakeFiles\rebuild_cache.util + +# ============================================================================= +# Target aliases. + +build Assignment3: phony ..\..\..\build\Assignment3.exe + +build Assignment3.exe: phony ..\..\..\build\Assignment3.exe + +build MyAstar: phony src\MyAstar.lib + +build MyAstar.lib: phony src\MyAstar.lib + +# ============================================================================= +# Folder targets. + +# ============================================================================= + +############################################# +# Folder: C:/Users/ռ/Desktop/PCL/iTraining/C++/codes/2023-07//Assignment3/version2/out/build/x64-Debug + +build all: phony ..\..\..\build\Assignment3.exe src\all + +# ============================================================================= + +############################################# +# Folder: C:/Users/ռ/Desktop/PCL/iTraining/C++/codes/2023-07//Assignment3/version2/out/build/x64-Debug/src + +build src\all: phony src\MyAstar.lib + +# ============================================================================= +# Unknown Build Time Dependencies. +# Tell Ninja that they may appear as side effects of build rules +# otherwise ordered by order-only dependencies. + +# ============================================================================= +# Built-in targets + + +############################################# +# Re-run CMake if any of its inputs changed. + +build build.ninja: RERUN_CMAKE | ..\..\..\CMakeLists.txt ..\..\..\src\CMakeLists.txt CMakeCache.txt CMakeFiles\3.22.22040401-MSVC_2\CMakeCXXCompiler.cmake CMakeFiles\3.22.22040401-MSVC_2\CMakeRCCompiler.cmake CMakeFiles\3.22.22040401-MSVC_2\CMakeSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXCompiler.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXCompilerABI.cpp D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCommonLanguageInclude.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCompilerIdDetection.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCXXCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompileFeatures.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompilerABI.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompilerId.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineRCCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeFindBinUtils.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeGenericSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeInitializeConfigs.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeLanguageInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseImplicitIncludeInfo.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseImplicitLinkInfo.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseLibraryArchitecture.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeRCCompiler.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeRCInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystem.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystemSpecificInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystemSpecificInitialize.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestCXXCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestCompilerCommon.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestRCCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ADSP-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ARMCC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ARMClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\AppleClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Borland-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\CMakeCommonCompilerMacros.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Clang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Clang-DetermineCompilerInternal.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Cray-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Embarcadero-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Fujitsu-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\GHS-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\HP-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IAR-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Intel-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\MSVC-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\MSVC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\NVHPC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\NVIDIA-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\PGI-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\PathScale-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\SCO-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\TI-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Watcom-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\XL-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Internal\FeatureTesting.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-Determine-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-MSVC-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-MSVC.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\WindowsPaths.cmake + pool = console + + +############################################# +# A missing CMake input file is not an error. + +build ..\..\..\CMakeLists.txt ..\..\..\src\CMakeLists.txt CMakeCache.txt CMakeFiles\3.22.22040401-MSVC_2\CMakeCXXCompiler.cmake CMakeFiles\3.22.22040401-MSVC_2\CMakeRCCompiler.cmake CMakeFiles\3.22.22040401-MSVC_2\CMakeSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXCompiler.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXCompilerABI.cpp D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCXXInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCommonLanguageInclude.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeCompilerIdDetection.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCXXCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompileFeatures.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompilerABI.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineCompilerId.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineRCCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeDetermineSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeFindBinUtils.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeGenericSystem.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeInitializeConfigs.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeLanguageInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseImplicitIncludeInfo.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseImplicitLinkInfo.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeParseLibraryArchitecture.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeRCCompiler.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeRCInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystem.cmake.in D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystemSpecificInformation.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeSystemSpecificInitialize.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestCXXCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestCompilerCommon.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\CMakeTestRCCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ADSP-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ARMCC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\ARMClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\AppleClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Borland-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\CMakeCommonCompilerMacros.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Clang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Clang-DetermineCompilerInternal.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Cray-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Embarcadero-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Fujitsu-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\GHS-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\HP-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IAR-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Intel-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\MSVC-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\MSVC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\NVHPC-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\NVIDIA-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\PGI-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\PathScale-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\SCO-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\TI-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\Watcom-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\XL-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Internal\FeatureTesting.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-Determine-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-MSVC-CXX.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows-MSVC.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\Windows.cmake D$:\software\Visual$ Studio$ 2022\Visual$ Studio$ IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.22\Modules\Platform\WindowsPaths.cmake: phony + + +############################################# +# Clean all the built files. + +build clean: CLEAN + + +############################################# +# Print all primary targets available. + +build help: HELP + + +############################################# +# Make the all target the default. + +default all diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/cmake_install.cmake" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/cmake_install.cmake" new file mode 100644 index 0000000000000000000000000000000000000000..11f5f02160e643750cddb62ac4254e8b1d1f006e --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/cmake_install.cmake" @@ -0,0 +1,50 @@ +# Install script for directory: C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2 + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/install/x64-Debug") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/src/cmake_install.cmake") + +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/build/x64-Debug/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/src/cmake_install.cmake" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/src/cmake_install.cmake" new file mode 100644 index 0000000000000000000000000000000000000000..c25343a9235aff59f65d09fdec9deb183e833f24 --- /dev/null +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/out/build/x64-Debug/src/cmake_install.cmake" @@ -0,0 +1,34 @@ +# Install script for directory: C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/src + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Users/苏坚荣/Desktop/PCL/iTraining/C++/codes/2023-07/王瑞/Assignment3/version2/out/install/x64-Debug") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + diff --git "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/src/testmap.cpp" "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/src/testmap.cpp" index 28048bb2f09b73efe4bb69fe8079b593f76b6c30..121f0c097316ef3cff4fc58abbe659ae2c94a25f 100644 --- "a/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/src/testmap.cpp" +++ "b/C++/codes/2023-07/\347\216\213\347\221\236/Assignment3/version2/src/testmap.cpp" @@ -18,4 +18,4 @@ void TestMap::set_TestMap(const int rows, const int cols, _testmap[rows - 1][cols - 1] = 0; _testmap[0][0] = 0; } -} // namespace mytestmap \ No newline at end of file +} // namespace mytestmap diff --git "a/C++/codes/2024-07/\350\213\217\345\235\232\350\215\243/C++\345\255\246\344\271\240\347\254\224\350\256\260.md" "b/C++/codes/2024-07/\350\213\217\345\235\232\350\215\243/C++\345\255\246\344\271\240\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..05722f7169d43c34da772c968d56f674d4a4f3e4 --- /dev/null +++ "b/C++/codes/2024-07/\350\213\217\345\235\232\350\215\243/C++\345\255\246\344\271\240\347\254\224\350\256\260.md" @@ -0,0 +1,21 @@ +# C++学习笔记 + +## 1. 搭建编程环境 + +[搭建编程环境](https://flowus.cn/share/347560ae-232e-4c73-aeee-541beb4fd5a6?code=1MPUFV) + +## 2. 插件学习 + +[插件学习](https://flowus.cn/share/9c12038a-611a-46e4-a55a-454efc685cb4?code=1MPUFV) + +## 3. 工具学习 + +[工具学习](https://flowus.cn/share/5a183daf-e5c6-4283-a77a-7c21bb55b73d?code=1MPUFV) + +## 4.《C++ Primer Plus》 + +[《C++ Primer Plus》学习笔记](https://flowus.cn/share/a14664aa-9d84-442e-b2bd-fad756921f7e?code=1MPUFV) + +## 5.《现代C++教程》 + +[《现代C++教程》学习笔记](https://flowus.cn/share/a8b3b778-bc91-4939-a1d4-732bac274603?code=1MPUFV) \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/EDA\345\255\246\344\271\240\347\254\224\350\256\260.md" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/EDA\345\255\246\344\271\240\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..2c047a8357ef473e4fbc95994dee744c35e8c909 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/EDA\345\255\246\344\271\240\347\254\224\350\256\260.md" @@ -0,0 +1,17 @@ +# EDA学习笔记 + +## 1.《超大规模集成电路物理设计:从图分割到时序收敛》 + +[《超大规模集成电路物理设计:从图分割到时序收敛》学习笔记](https://flowus.cn/share/cd592b74-14d7-40bc-a6ba-f96bd08d857e?code=1MPUFV) + +## 2.《数字集成电路物理设计》 + +[《数字集成电路物理设计》学习笔记](https://flowus.cn/share/468d5dab-d403-47b3-9e6b-630672d4e8a4?code=1MPUFV) + +## 3. EDA后端流程总结 + +[EDA后端流程总结](https://flowus.cn/share/0525742d-07de-4d18-95fb-b9ca39a9ec8c?code=1MPUFV) + +## 4. EDA基础学习总结 + +[EDA基础学习总结](https://flowus.cn/share/9f074459-a0c3-498c-a601-3b58b7a963f1?code=1MPUFV) \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/1.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/1.png" new file mode 100644 index 0000000000000000000000000000000000000000..48b6a225158dda18655352da3c6736ad49823c8d Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/1.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/10.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/10.png" new file mode 100644 index 0000000000000000000000000000000000000000..3f16eda9d66b56689e653ff3236d6e9441e30540 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/10.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/11.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/11.png" new file mode 100644 index 0000000000000000000000000000000000000000..a322b8f53aeff1ece706ed5114cac8f4f7b651e6 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/11.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/12.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/12.png" new file mode 100644 index 0000000000000000000000000000000000000000..cbc19022872ee2b275537915b7cc9beb43360662 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/12.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/13.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/13.png" new file mode 100644 index 0000000000000000000000000000000000000000..2b951579e2c79c4482bf963c35f1231079707a64 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/13.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/14.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/14.png" new file mode 100644 index 0000000000000000000000000000000000000000..3f753365a870a5e7f9114da08f93050b8d41ce26 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/14.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/15.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/15.png" new file mode 100644 index 0000000000000000000000000000000000000000..167fec6e934835c3c56e35cb08dfe1a25257e29c Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/15.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/16.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/16.png" new file mode 100644 index 0000000000000000000000000000000000000000..c23965d9b30c2eba9fd7c67434a85d26d6973dd0 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/16.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/17.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/17.png" new file mode 100644 index 0000000000000000000000000000000000000000..38cade98ebc8b80a25bd7cd2fa4447615ed55384 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/17.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/18.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/18.png" new file mode 100644 index 0000000000000000000000000000000000000000..0c63de650c9f42314642bba16929679280954ef4 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/18.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/2.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/2.png" new file mode 100644 index 0000000000000000000000000000000000000000..dd47b084b5789aea6489e8465efd492dfc8de0ff Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/2.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/3.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/3.png" new file mode 100644 index 0000000000000000000000000000000000000000..00e50d1f87888aafa36f312e83c5e8c84f50e281 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/3.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/4.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/4.png" new file mode 100644 index 0000000000000000000000000000000000000000..cc96afc751a17d5122fa153cfc274698b5c1b313 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/4.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/5.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/5.png" new file mode 100644 index 0000000000000000000000000000000000000000..d11421208bbe395334042b00953a7e6f0cd889fb Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/5.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/6.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/6.png" new file mode 100644 index 0000000000000000000000000000000000000000..0f78e770027d197a31d579c61c697d74a3346b1f Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/6.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/7.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/7.png" new file mode 100644 index 0000000000000000000000000000000000000000..dfc351dfcbf5d46d285263c6047ff16a09f15b56 Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/7.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/8.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/8.png" new file mode 100644 index 0000000000000000000000000000000000000000..203fa88babfd9d6a2f434ce97d35c954b428c95a Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/8.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/9.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/9.png" new file mode 100644 index 0000000000000000000000000000000000000000..37db72220c606c4ed43ff958dee85b14dd70cd4e Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/9.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Abacus\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Abacus\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" new file mode 100644 index 0000000000000000000000000000000000000000..35678838043075937431b910ab3519048896dd1c Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Abacus\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Tetris\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Tetris\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" new file mode 100644 index 0000000000000000000000000000000000000000..1e854a2fd5bfbdb899c5a9e6579639b01d6741cd Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/images/Tetris\347\256\227\346\263\225\346\265\201\347\250\213\345\233\276.png" differ diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/CMakeLists.txt" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/CMakeLists.txt" new file mode 100644 index 0000000000000000000000000000000000000000..3fa416ccb3c3b6ec241fb2ca2f8a581e864c3b8c --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/CMakeLists.txt" @@ -0,0 +1,18 @@ +add_subdirectory(method) + +add_library(solver_legalization + LGMethodCreator.cc +) + +target_link_libraries(solver_legalization + PRIVATE + solver_lg_method +) + +target_include_directories(solver_legalization + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/method +) + +message("-- Solver-Legalization: ENABLE") \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.cc" new file mode 100644 index 0000000000000000000000000000000000000000..6c08cb7897b9f7a7bf7df7afabe78280679d520f --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.cc" @@ -0,0 +1,48 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** +#include "LGMethodCreator.hh" + +#include "Abacus.hh" +#include "Tetris.hh" +#include "LGCustomization.hh" +#include "LGMethodInterface.hh" + +namespace ieda_solver { + +LGMethodInterface* LGMethodCreator::createMethod(LG_METHOD method_type) +{ + LGMethodInterface* method = nullptr; + + switch (method_type) { + case LG_METHOD::kAbacus: + method = new Abacus(); + break; + case LG_METHOD::kCustomized: + method = new LGCustomization(); + break; + case LG_METHOD::kTetris: + method = new Tetris(); + break; + + default: + break; + } + + return method; +} + +} // namespace ieda_solver \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.hh" new file mode 100644 index 0000000000000000000000000000000000000000..5db2a0fed05850522a555eb1ac31c10936752fb0 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/LGMethodCreator.hh" @@ -0,0 +1,47 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#pragma once + +#include + +namespace ieda_solver { + +class LGMethodInterface; + +enum class LG_METHOD +{ + kNone, + kAbacus, + kCustomized, + kTetris +}; + +class LGMethodCreator +{ + public: + LGMethodCreator() {} + ~LGMethodCreator() {} + + //LGMethodInterface* createMethod(LG_METHOD method_type = LG_METHOD::kAbacus); + LGMethodInterface* createMethod(LG_METHOD method_type = LG_METHOD::kTetris); + + + private: +}; + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/CMakeLists.txt" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/CMakeLists.txt" new file mode 100644 index 0000000000000000000000000000000000000000..c5457038b6e853ac41d7f4d82c168164fb507e87 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/CMakeLists.txt" @@ -0,0 +1,27 @@ +add_library(solver_lg_method + abacus/AbacusCluster.cc + abacus/Abacus.cc + customization/LGCustomization.cc + tetris/TetrisCluster.cc + tetris/Tetris.cc +) + +target_link_libraries(solver_lg_method + PRIVATE + ipl-module-logger + ipl-bridge + ipl-configurator +) + +target_include_directories(solver_lg_method + PUBLIC + ${HOME_OPERATION}/iPL/source + ${HOME_OPERATION}/iPL/source/module/legalizer/config + ${HOME_OPERATION}/iPL/source/module/legalizer/database + + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/abacus + ${CMAKE_CURRENT_SOURCE_DIR}/customization + ${CMAKE_CURRENT_SOURCE_DIR}/tetris + +) \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/LGMethodInterface.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/LGMethodInterface.hh" new file mode 100644 index 0000000000000000000000000000000000000000..0505db8e66aedbfe6a6752c780ccd51c1378ea1b --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/LGMethodInterface.hh" @@ -0,0 +1,50 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#pragma once + +#include + +namespace ipl { +class LGConfig; +class LGDatabase; +class LGInstance; +} // namespace ipl + +namespace ieda_solver { + +class LGMethodInterface +{ + public: + LGMethodInterface() {} + virtual ~LGMethodInterface() {} + + virtual void initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) = 0; + virtual bool isInitialized() = 0; + virtual bool runLegalization() = 0; + + virtual void specifyTargetInstList(std::vector& target_inst_list) = 0; + virtual bool runIncrLegalization() = 0; + virtual bool runRollback(bool clear_but_not_rollback) = 0; + + protected: + ipl::LGDatabase* _database = nullptr; + ipl::LGConfig* _config = nullptr; + std::vector _target_inst_list; +}; + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.cc" new file mode 100644 index 0000000000000000000000000000000000000000..02a72cfe149bd81942ae12fe4e5c68871b30e911 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.cc" @@ -0,0 +1,1144 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#include "Abacus.hh" + +#include +#include + +#include "LGDatabase.hh" +#include "LGInstance.hh" +#include "LGInterval.hh" + +namespace ieda_solver { + + Abacus::~Abacus() + { + for (auto pair : _cluster_map) { + delete pair.second; + } + _cluster_map.clear(); + _inst_belong_cluster.clear(); + _interval_cluster_root.clear(); + _interval_remain_length.clear(); + } + + void Abacus::initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) + { + // clean abacus info first. + _cluster_map.clear(); + _inst_belong_cluster.clear(); + _interval_cluster_root.clear(); + _interval_remain_length.clear(); + + _database = lg_database; + _config = lg_config; + + _inst_belong_cluster.resize(_database->get_lgInstance_list().size(), nullptr); + + int32_t interval_cnt = 0; + for (auto& interval_vec : _database->get_lg_layout()->get_interval_2d_list()) { + for (auto* interval : interval_vec) { + interval_cnt++; + _interval_remain_length.push_back(interval->get_max_x() - interval->get_min_x()); + } + } + _interval_cluster_root.resize(interval_cnt, nullptr); + + _row_height = _database->get_lg_layout()->get_row_height(); + _site_width = _database->get_lg_layout()->get_site_width(); + } + + bool Abacus::isInitialized() + { + return !_cluster_map.empty(); + } + + void Abacus::specifyTargetInstList(std::vector& target_inst_list) + { + _target_inst_list.clear(); + _target_inst_list = target_inst_list; + } + + bool Abacus::runLegalization() + { + // Sort all movable instances + std::vector movable_inst_list; + pickAndSortMovableInstList(movable_inst_list); + + int32_t inst_id = 0; + for (auto* inst : movable_inst_list) { + + int32_t best_row = INT32_MAX; + int32_t best_cost = INT32_MAX; + for (int32_t row_idx = 0; row_idx < _database->get_lg_layout()->get_row_num(); row_idx++) { + int32_t cost = placeRow(inst, row_idx, true, false); + + if (cost < best_cost) { + best_cost = cost; + best_row = row_idx; + } + } + + if (best_row == INT32_MAX) { + LOG_ERROR << "Instance: " << inst->get_name() << "Cannot find a row for placement"; + return false; + } + + placeRow(inst, best_row, false, false); + + inst_id++; + if (inst_id % 100000 == 0) { + LOG_INFO << "Place Instance : " << inst_id; + } + } + + return true; + } + + bool Abacus::runIncrLegalization() + { + int32_t row_range_num = 5; + int32_t row_num = _database->get_lg_layout()->get_row_num(); + + // spilt new inst from the cluster. + RollbackInfo rollback_info; + for (auto* inst : _target_inst_list) { + splitTargetInst(inst, rollback_info); + } + rollback_info.is_dirty = true; + _rollback_stack.push(rollback_info); + + for (auto* inst : _target_inst_list) { + int32_t row_idx = inst->get_coordi().get_y() / _row_height; + int32_t max_row_idx = (row_idx + row_range_num > row_num) ? row_num : row_idx + row_range_num; + int32_t min_row_idx = (row_idx - row_range_num < 0) ? 0 : row_idx - row_range_num; + + int32_t best_row = INT32_MAX; + int32_t best_cost = INT32_MAX; + for (int32_t row_idx = min_row_idx; row_idx < max_row_idx; row_idx++) { + int32_t cost = placeRow(inst, row_idx, true, false); + if (cost < best_cost) { + best_cost = cost; + best_row = row_idx; + } + } + placeRow(inst, best_row, false, true); + } + + return true; + } + + void Abacus::pickAndSortMovableInstList(std::vector& movable_inst_list) + { + for (auto* inst : _database->get_lgInstance_list()) { + if (inst->get_state() == ipl::LGINSTANCE_STATE::kFixed) { + continue; + } + movable_inst_list.push_back(inst); + } + + std::sort(movable_inst_list.begin(), movable_inst_list.end(), + [](ipl::LGInstance* l_inst, ipl::LGInstance* r_inst) { return (l_inst->get_coordi().get_x() < r_inst->get_coordi().get_x()); }); + } + + int32_t Abacus::placeRow(ipl::LGInstance* inst, int32_t row_idx, bool is_trial, bool is_record_cluster) + { + // 获取实例的形状 + ipl::Rectangle inst_shape = std::move(inst->get_shape()); + + // 获取当前行的区间列表 + std::vector interval_list = _database->get_lg_layout()->get_interval_2d_list()[row_idx]; + + // 选择最近的区间 + int32_t row_interval_idx = searchNearestIntervalIndex(interval_list, inst_shape); + if (row_interval_idx == INT32_MAX) { + // 如果没有找到合适的区间,返回最大整数表示失败 + return INT32_MAX; + } + + // 如果选定区间剩余长度小于实例宽度,寻找备用区间 + if (_interval_remain_length[interval_list[row_interval_idx]->get_index()] < inst_shape.get_width()) { + int32_t origin_idx = row_interval_idx; + row_interval_idx = searchRemainSpaceSegIndex(interval_list, inst_shape, origin_idx); + if (row_interval_idx == origin_idx) { + // 如果没有足够空间放置实例,返回最大整数表示失败 + return INT32_MAX; + } + } + + // 将实例安排到选定区间 + auto* target_interval = interval_list[row_interval_idx]; + AbacusCluster target_cluster = std::move(arrangeInstIntoIntervalCluster(inst, target_interval)); + + // 计算成本 + int32_t movement_cost = 0; // 移动成本初始化为0 + int32_t coordi_x = target_cluster.get_min_x(); // 获取簇的最小x坐标 + int32_t inst_movement_x = INT32_MAX; + for (auto* target_inst : target_cluster.get_inst_list()) { + int32_t origin_x = target_inst->get_coordi().get_x(); + if (target_inst == inst) { + inst_movement_x = std::abs(coordi_x - origin_x); + } + else { + movement_cost += std::abs(coordi_x - origin_x); + } + coordi_x += target_inst->get_shape().get_width(); + } + + // 添加实例的坐标移动成本 + int32_t inst_movement_y = std::abs(row_idx * _row_height - inst_shape.get_ll_y()); + int32_t inst_displacement = inst_movement_x + inst_movement_y; + movement_cost += inst_displacement; + + // 如果实例移动超出最大限制,则加重罚分 + if (inst_displacement > _config->get_max_displacement()) { + movement_cost += _database->get_lg_layout()->get_max_x(); + } + + // 如果不是试验放置,则替换簇信息并更新剩余长度 + if (!is_trial) { + replaceClusterInfo(target_cluster, is_record_cluster); + this->updateRemainLength(target_interval, -(inst->get_shape().get_width())); + } + + return movement_cost; // 返回计算得到的移动成本 + } + + + int32_t Abacus::searchNearestIntervalIndex(std::vector& segment_list, ipl::Rectangle& inst_shape) + { + if (segment_list.size() == 1) { + return 0; + } + + int32_t prev_distance = INT32_MAX; + int32_t segment_idx = INT32_MAX; + for (size_t i = 0; i < segment_list.size(); i++) { + int32_t cur_distance + = calDistanceWithBox(inst_shape.get_ll_x(), inst_shape.get_ur_x(), segment_list[i]->get_min_x(), segment_list[i]->get_max_x()); + if (cur_distance > prev_distance) { + segment_idx = i - 1; + break; + } + if (cur_distance == 0) { + segment_idx = i; + break; + } + + prev_distance = cur_distance; + } + + return segment_idx; + } + + int32_t Abacus::calDistanceWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x) + { + if (max_x >= box_min_x && min_x <= box_max_x) { + return 0; + } + else if (min_x > box_max_x) { + return (min_x - box_max_x); + } + else if (max_x < box_min_x) { + return (box_min_x - max_x); + } + else { + return INT32_MAX; + } + } + + int32_t Abacus::searchRemainSpaceSegIndex(std::vector& segment_list, ipl::Rectangle& inst_shape, + int32_t origin_index) + { + int32_t segment_idx = origin_index; + // int32_t max_range = segment_list.size() - 1; + int32_t max_range = 2; + int32_t range = 1; + while (range <= max_range) { + int32_t r_idx = segment_idx; + if (r_idx + range < static_cast(segment_list.size())) { + r_idx += range; + int32_t interval_idx = segment_list[r_idx]->get_index(); + if (_interval_remain_length[interval_idx] >= inst_shape.get_width()) { + segment_idx = r_idx; + break; + } + } + int32_t l_idx = segment_idx; + if (l_idx - range >= 0) { + l_idx -= range; + int32_t interval_idx = segment_list[l_idx]->get_index(); + if (_interval_remain_length[interval_idx] >= inst_shape.get_width()) { + segment_idx = l_idx; + break; + } + } + range++; + } + return segment_idx; + } + + AbacusCluster Abacus::arrangeInstIntoIntervalCluster(ipl::LGInstance* inst, ipl::LGInterval* interval) + { + auto inst_shape = std::move(inst->get_shape()); + AbacusCluster record_cluster; + auto* cur_cluster = _interval_cluster_root[interval->get_index()]; + auto* last_cluster = cur_cluster; + bool is_collapse = false; + + if (cur_cluster && (inst_shape.get_ur_x() < cur_cluster->get_min_x())) { + // should insert in the cluster + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + } + else { + while (cur_cluster) { + if (checkOverlapWithBox(inst_shape.get_ll_x(), inst_shape.get_ur_x(), cur_cluster->get_min_x(), cur_cluster->get_max_x())) { + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + break; + } + auto* back_cluster = findCluster(cur_cluster->get_back_cluster()); + if (back_cluster) { + // tmp fix bug. + if (inst_shape.get_ll_x() >= cur_cluster->get_max_x() && inst_shape.get_ur_x() <= back_cluster->get_min_x()) { + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + break; + } + + last_cluster = back_cluster; + } + cur_cluster = back_cluster; + } + } + + if (!is_collapse) { + // Create new cluster + std::string cluster_name = obtainUniqueClusterName(inst->get_name()); + record_cluster = AbacusCluster(cluster_name); + + // auto* exist_cluster = findCluster(inst->get_name()); + // if (exist_cluster) { + // record_cluster = AbacusCluster(exist_cluster->get_name() + "_2024"); + // } + // else { + // record_cluster = AbacusCluster(inst->get_name()); + // } + // // record_cluster = AbacusCluster(inst->get_name()); + + record_cluster.add_inst(inst); + record_cluster.appendInst(inst); + record_cluster.set_belong_interval(interval); + if (last_cluster) { + record_cluster.set_front_cluster(last_cluster->get_name()); + } + legalizeCluster(record_cluster); + } + + return record_cluster; + } + + void Abacus::legalizeCluster(AbacusCluster& cluster) + { + arrangeClusterMinXCoordi(cluster); + int32_t cur_min_x, front_max_x, back_min_x; + cur_min_x = cluster.get_min_x(); + front_max_x = obtainFrontMaxX(cluster); + + back_min_x = obtainBackMinX(cluster); + while ((cur_min_x < front_max_x) || (cur_min_x + cluster.get_total_width() > back_min_x)) { + while (cur_min_x < front_max_x) { + + AbacusCluster front_cluster = *(this->findCluster(cluster.get_front_cluster())); + mergeWithPreviousCluster(cluster, front_cluster); + arrangeClusterMinXCoordi(cluster); + cur_min_x = cluster.get_min_x(); + front_max_x = obtainFrontMaxX(cluster); + + // front_cluster.appendCluster(cluster); + + // front_cluster.set_back_cluster(cluster.get_back_cluster()); + // arrangeClusterMinXCoordi(front_cluster); + // cur_min_x = front_cluster.get_min_x(); + // front_max_x = obtainFrontMaxX(front_cluster); + // cluster = front_cluster; + + } + + cur_min_x = cluster.get_min_x(); + back_min_x = obtainBackMinX(cluster); + while (cur_min_x + cluster.get_total_width() > back_min_x) { + auto* back_cluster = this->findCluster(cluster.get_back_cluster()); + mergeWithNextCluster(cluster, *back_cluster); + + // cluster.appendCluster(*back_cluster); + // cluster.set_back_cluster(back_cluster->get_back_cluster()); + arrangeClusterMinXCoordi(cluster); + cur_min_x = cluster.get_min_x(); + back_min_x = obtainBackMinX(cluster); + } + } + + } + + void Abacus::mergeWithPreviousCluster(AbacusCluster& cluster, AbacusCluster prev_cluster) { + AbacusCluster tmp_cluster(cluster.get_name()); + tmp_cluster.set_belong_interval(cluster.get_belong_interval()); + tmp_cluster.appendInstList(prev_cluster.get_inst_list()); + tmp_cluster.appendCluster(cluster); + + tmp_cluster.set_front_cluster(prev_cluster.get_front_cluster()); + tmp_cluster.set_back_cluster(cluster.get_back_cluster()); + + cluster = std::move(tmp_cluster); + } + + void Abacus::mergeWithNextCluster(AbacusCluster& cluster, AbacusCluster next_cluster) { + cluster.appendCluster(next_cluster); + cluster.set_back_cluster(next_cluster.get_back_cluster()); + } + + void Abacus::arrangeClusterMinXCoordi(AbacusCluster& cluster) + { + int32_t cluster_x = (cluster.get_weight_q() / cluster.get_weight_e()); + cluster_x = (cluster_x / _site_width) * _site_width; + + int32_t boundary_min_x = cluster.get_belong_interval()->get_min_x(); + int32_t boundary_max_x = cluster.get_belong_interval()->get_max_x(); + cluster_x < boundary_min_x ? cluster_x = boundary_min_x : cluster_x; + cluster_x + cluster.get_total_width() > boundary_max_x ? cluster_x = boundary_max_x - cluster.get_total_width() : cluster_x; + + if (cluster_x < boundary_min_x) { + std::cout << "Cluster width is out of interval capcity" << std::endl; + } + + cluster.set_min_x(cluster_x); + } + + int32_t Abacus::obtainFrontMaxX(AbacusCluster& cluster) + { + int32_t front_max_x = cluster.get_belong_interval()->get_min_x(); + auto* front_cluster = this->findCluster(cluster.get_front_cluster()); + if (front_cluster) { + front_max_x = front_cluster->get_max_x(); + } + return front_max_x; + } + + int32_t Abacus::obtainBackMinX(AbacusCluster& cluster) + { + int32_t back_min_x = cluster.get_belong_interval()->get_max_x(); + auto* back_cluster = this->findCluster(cluster.get_back_cluster()); + if (back_cluster) { + back_min_x = back_cluster->get_min_x(); + } + return back_min_x; + } + + bool Abacus::checkOverlapWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x) + { + if (max_x > box_min_x && min_x < box_max_x) { + return true; + } + else { + return false; + } + } + + void Abacus::replaceClusterInfo(AbacusCluster& modify_cluster, bool is_record_cluster) { + auto* origin_interval = modify_cluster.get_belong_interval(); + int32_t coordi_y = origin_interval->get_belong_row()->get_coordinate().get_y(); + + // record rollback info + RollbackInfo rollback_info; + + auto* cluster_ptr = this->findCluster(modify_cluster.get_name()); + std::string origin_back_cluster_name = ""; + if (!cluster_ptr) { + AbacusCluster* new_cluster = new AbacusCluster(modify_cluster); + this->insertCluster(new_cluster->get_name(), new_cluster); + cluster_ptr = new_cluster; + + if (is_record_cluster) { + rollback_info.addition_clusters.push_back(modify_cluster); + } + } + else { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*cluster_ptr); + rollback_info.addition_clusters.push_back(modify_cluster); + } + + origin_back_cluster_name = cluster_ptr->get_back_cluster(); + *cluster_ptr = std::move(modify_cluster); + } + + auto* origin_root = _interval_cluster_root[origin_interval->get_index()]; + std::string front_cluster_name = cluster_ptr->get_front_cluster(); + std::string back_cluster_name = cluster_ptr->get_back_cluster(); + auto* front_cluster = this->findCluster(front_cluster_name); + auto* back_cluster = this->findCluster(back_cluster_name); + + // front cluster case + if (!origin_root && !front_cluster) { + // cur cluster is root + _interval_cluster_root[origin_interval->get_index()] = cluster_ptr; + } + else if (origin_root && !front_cluster) { + // from origin root to cur cluster need to erase. + auto* tmp_cluster = origin_root; + while (tmp_cluster->get_name() != cluster_ptr->get_name()) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + if (!tmp_cluster) { + break; + } + } + _interval_cluster_root[origin_interval->get_index()] = cluster_ptr; + } + else if (!origin_root && front_cluster) { + LOG_ERROR << "Interval root is not recorded!!!"; + } + else { + // from front cluster to cur cluster need to erase. + auto* tmp_cluster = this->findCluster(front_cluster->get_back_cluster()); + while (tmp_cluster && (tmp_cluster->get_name() != cluster_ptr->get_name())) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + } + + // back cluster case + auto* origin_back_cluster = this->findCluster(origin_back_cluster_name); + if (!back_cluster && !origin_back_cluster) { + // + } + else if (back_cluster && !origin_back_cluster) { + LOG_ERROR << "Back cluster is not recorded !!!"; + } + else if (!back_cluster && origin_back_cluster) { + auto* tmp_cluster = origin_back_cluster; + while (tmp_cluster) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + } + else { + // from origin_back_cluster to back_cluster need to erase. + auto* tmp_cluster = origin_back_cluster; + while (tmp_cluster && (tmp_cluster->get_name() != back_cluster->get_name())) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + + + } + + if (front_cluster) { + front_cluster->set_back_cluster(cluster_ptr->get_name()); + } + if (back_cluster) { + back_cluster->set_front_cluster(cluster_ptr->get_name()); + } + + // update all inst info + int32_t coordi_x = cluster_ptr->get_min_x(); + for (auto* inst : cluster_ptr->get_inst_list()) { + _inst_belong_cluster[inst->get_index()] = cluster_ptr; + inst->updateCoordi(coordi_x, coordi_y); + coordi_x += inst->get_shape().get_width(); + } + + // record + if (is_record_cluster) { + rollback_info.is_dirty = true; + _rollback_stack.push(rollback_info); + } + + } + + // void Abacus::replaceClusterInfo(AbacusCluster& modify_cluster, bool is_record_cluster) + // { + // auto* origin_interval = modify_cluster.get_belong_interval(); + // int32_t coordi_y = origin_interval->get_belong_row()->get_coordinate().get_y(); + + // auto* cluster_ptr = this->findCluster(modify_cluster.get_name()); + // if (!cluster_ptr) { + // AbacusCluster* new_cluster = new AbacusCluster(std::move(modify_cluster)); + // auto inst_list = new_cluster->get_inst_list(); + // if (inst_list.size() > 1 || inst_list.size() == 0) { + // std::cout << "Cluster Inst is not correctly set" << std::endl; + // } + + // // cluster setting. + // _inst_belong_cluster[inst_list[0]->get_index()] = new_cluster; + // inst_list[0]->updateCoordi(new_cluster->get_min_x(), coordi_y); + + // this->insertCluster(new_cluster->get_name(), new_cluster); + + // // front cluster. + // std::string front_cluster_name = new_cluster->get_front_cluster(); + // std::string back_cluster_name = new_cluster->get_back_cluster(); + // auto* front_cluster = findCluster(front_cluster_name); + // auto* back_cluster = findCluster(back_cluster_name); + // if (front_cluster) { + // front_cluster->set_back_cluster(new_cluster->get_name()); + + // // assert + // if (back_cluster) { + // if (back_cluster_name != new_cluster->get_back_cluster()) { + // LOG_WARNING << "Unrecord back cluster!!!"; + // } + // } + // } + // else { + // if (_interval_cluster_root[origin_interval->get_index()]) { + // LOG_WARNING << "Unrecord front cluster!!!"; + // } + // else { + // _interval_cluster_root[origin_interval->get_index()] = new_cluster; + // } + // } + + // if (back_cluster) { + // back_cluster->set_front_cluster(new_cluster->get_name()); + // } + + // if (is_record_cluster) { + // RollbackInfo rollback_info; + // rollback_info.is_dirty = true; + // rollback_info.addition_clusters.push_back(*new_cluster); + // _rollback_stack.push(rollback_info); + // } + // return; + // } + + // auto& origin_cluster = *(cluster_ptr); + // auto* origin_root = _interval_cluster_root[origin_interval->get_index()]; + + // // record rollback info + // RollbackInfo rollback_info; + + // // may be collapsing with front or back cluster + // AbacusCluster* front_origin = this->findCluster(origin_cluster.get_front_cluster()); + // AbacusCluster* front_modify = this->findCluster(modify_cluster.get_front_cluster()); + // while (front_origin != front_modify) { + // if (is_record_cluster && front_origin) { + // rollback_info.origin_clusters.push_back(*front_origin); + // } + + // if (front_origin == origin_root) { + // _interval_cluster_root[origin_interval->get_index()] = &origin_cluster; + // } + + // std::string delete_cluster = front_origin->get_name(); + // front_origin = this->findCluster(front_origin->get_front_cluster()); + // if (front_origin) { + // front_origin->set_back_cluster(origin_cluster.get_name()); + // } + // this->deleteCluster(delete_cluster); + // } + + // // test + // if (is_record_cluster) { + // rollback_info.addition_clusters.push_back(modify_cluster); + // rollback_info.origin_clusters.push_back(origin_cluster); + // } + + // AbacusCluster* back_origin = this->findCluster(origin_cluster.get_back_cluster()); + // AbacusCluster* back_modify = this->findCluster(modify_cluster.get_back_cluster()); + // while (back_origin != back_modify) { + // if (is_record_cluster && back_origin) { + // rollback_info.origin_clusters.push_back(*back_origin); + // } + + // std::string delete_cluster = back_origin->get_name(); + + // back_origin = this->findCluster(back_origin->get_back_cluster()); + // if (back_origin) { + // back_origin->set_front_cluster(origin_cluster.get_name()); + // } + // this->deleteCluster(delete_cluster); + // } + + // // update all inst info + // origin_cluster = std::move(modify_cluster); + // int32_t coordi_x = origin_cluster.get_min_x(); + // for (auto* inst : origin_cluster.get_inst_list()) { + // _inst_belong_cluster[inst->get_index()] = &origin_cluster; + // inst->updateCoordi(coordi_x, coordi_y); + // coordi_x += inst->get_shape().get_width(); + // } + + // // final push rollback stack + // if (is_record_cluster) { + // rollback_info.is_dirty = true; + // _rollback_stack.push(rollback_info); + // } + // } + + AbacusCluster* Abacus::findCluster(std::string cluster_name) + { + if (cluster_name == "") { + return nullptr; + } + AbacusCluster* cluster = nullptr; + auto it = _cluster_map.find(cluster_name); + if (it != _cluster_map.end()) { + cluster = it->second; + } + + return cluster; + } + + void Abacus::insertCluster(std::string name, AbacusCluster* cluster) + { + auto it = _cluster_map.find(name); + if (it != _cluster_map.end()) { + std::cout << "Cluster : " << name << " was added before" << std::endl; + } + _cluster_map.emplace(name, cluster); + } + + void Abacus::deleteCluster(std::string name) + { + auto it = _cluster_map.find(name); + if (it != _cluster_map.end()) { + _cluster_map.erase(it); + } + else { + std::cout << "Cluster: " << name << " has not been insert" << std::endl; + } + } + + void Abacus::updateRemainLength(ipl::LGInterval* interval, int32_t delta) + { + int32_t cur_value = _interval_remain_length[interval->get_index()]; + _interval_remain_length[interval->get_index()] = cur_value + delta; + } + + void Abacus::splitTargetInst(ipl::LGInstance* inst, RollbackInfo& rollback_info) + { + int32_t inst_width = inst->get_shape().get_width(); + auto* target_cluster = _inst_belong_cluster[inst->get_index()]; + ipl::LGInterval* target_interval = target_cluster->get_belong_interval(); + int32_t target_size = target_cluster->get_inst_list().size(); + + rollback_info.origin_clusters.push_back(*target_cluster); + + if (target_size == 1) { + auto* front_cluster = this->findCluster(target_cluster->get_front_cluster()); + auto* back_cluster = this->findCluster(target_cluster->get_back_cluster()); + if (!front_cluster && !back_cluster) { + // + } + else if (!front_cluster && back_cluster) { + back_cluster->set_front_cluster(""); + } + else if (front_cluster && !back_cluster) { + front_cluster->set_back_cluster(""); + } + else { + front_cluster->set_back_cluster(back_cluster->get_name()); + back_cluster->set_front_cluster(front_cluster->get_name()); + } + + // move the root + if (_interval_cluster_root[target_interval->get_index()]->get_name() == target_cluster->get_name()) { + _interval_cluster_root[target_interval->get_index()] = back_cluster; + } + + deleteCluster(target_cluster->get_name()); + } + else { + int32_t inst_idx = target_cluster->obtainInstIdx(inst); + if (inst_idx == -1) { + LOG_WARNING << "Inst is not in target cluster!!!"; + return; + } + + if ((inst_idx == 0) || (inst_idx == target_size - 1)) { + target_cluster->eraseTargetInstByIdx(inst_idx); + int32_t min_x = target_cluster->get_inst_list().front()->get_coordi().get_x(); + target_cluster->set_min_x(min_x); + target_cluster->updateAbacusInfo(); + } + else if ((inst_idx > 0) && (inst_idx < target_size)) { + // split cluster + std::vector origin_inst_list = target_cluster->get_inst_list(); + std::vector new_inst_list(origin_inst_list.begin() + inst_idx + 1, origin_inst_list.end()); + target_cluster->eraseTargetInstByIdxPair(inst_idx, target_size - 1); + target_cluster->updateAbacusInfo(); + + // add new cluster + ipl::LGInstance* flag_inst = new_inst_list[0]; + + AbacusCluster* new_cluster; + std::string cluster_name = obtainUniqueClusterName(flag_inst->get_name()); + new_cluster = new AbacusCluster(cluster_name); + + // auto* exist_cluster = findCluster(flag_inst->get_name()); + // if (exist_cluster) { + // new_cluster = new AbacusCluster(exist_cluster->get_name() + "_2024"); + // } + // else { + // new_cluster = new AbacusCluster(flag_inst->get_name()); + // } + + new_cluster->appendInstList(new_inst_list); + new_cluster->set_min_x(flag_inst->get_coordi().get_x()); + // update inst to cluster + for(auto* inst : new_cluster->get_inst_list()){ + _inst_belong_cluster[inst->get_index()] = new_cluster; + } + + new_cluster->updateAbacusInfo(); + new_cluster->set_belong_interval(target_interval); + new_cluster->set_front_cluster(target_cluster->get_name()); + std::string back_cluster_name = target_cluster->get_back_cluster(); + auto* back_cluster = findCluster(back_cluster_name); + if (back_cluster) { + new_cluster->set_back_cluster(back_cluster_name); + back_cluster->set_front_cluster(new_cluster->get_name()); + } + target_cluster->set_back_cluster(new_cluster->get_name()); + + this->insertCluster(new_cluster->get_name(), new_cluster); + rollback_info.addition_clusters.push_back(*new_cluster); + } + rollback_info.addition_clusters.push_back(*target_cluster); + } + + _inst_belong_cluster[inst->get_index()] = nullptr; + _interval_remain_length[target_interval->get_index()] += inst_width; + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Split***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + bool Abacus::runRollback(bool clear_but_not_rollback) { + if (clear_but_not_rollback) { + // clear. + std::stack().swap(_rollback_stack); + return true; + } + + while (!_rollback_stack.empty()) { + auto& rollback_info = _rollback_stack.top(); + + if (!rollback_info.is_dirty) { + _rollback_stack.pop(); + continue; + } + + std::map> interval_to_clusters; + for (auto& cluster : rollback_info.addition_clusters) { + ipl::LGInterval* target_interval = cluster.get_belong_interval(); + auto it = interval_to_clusters.find(target_interval); + if (it != interval_to_clusters.end()) { + it->second.push_back(cluster); + } + else { + interval_to_clusters.emplace(target_interval, std::vector{cluster}); + } + } + + for (auto pair : interval_to_clusters) { + auto* target_interval = pair.first; + this->deleteTargetIntervalClusters(target_interval, pair.second); + + // interval to reset remain length. + this->reCalIntervalRemainLength(target_interval); + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Rollback (delete) ***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + interval_to_clusters.clear(); + + // sort the origin_clusters + std::sort(rollback_info.origin_clusters.begin(), rollback_info.origin_clusters.end(), + [](const AbacusCluster& a, const AbacusCluster& b) { + return a.get_min_x() < b.get_min_x(); + }); + + for (auto& cluster : rollback_info.origin_clusters) { + ipl::LGInterval* target_interval = cluster.get_belong_interval(); + auto it = interval_to_clusters.find(target_interval); + if (it != interval_to_clusters.end()) { + it->second.push_back(cluster); + } + else { + interval_to_clusters.emplace(target_interval, std::vector{cluster}); + } + } + + for (auto pair : interval_to_clusters) { + auto* target_interval = pair.first; + this->insertTargetIntervalClusters(target_interval, pair.second); + + // interval to reset remain length. + this->reCalIntervalRemainLength(target_interval); + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Rollback (insert) ***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + _rollback_stack.pop(); + } + return true; + } + + + void Abacus::deleteTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list) { + int32_t interval_idx = interval->get_index(); + auto* interval_root = _interval_cluster_root[interval_idx]; + + AbacusCluster* prev_cluster = nullptr; + AbacusCluster* cur_cluster = interval_root; + AbacusCluster* back_cluster = nullptr; + + while (cur_cluster) { + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + std::string prev_cluster_name = cur_cluster->get_front_cluster(); + prev_cluster = this->findCluster(prev_cluster_name); + + bool changed_flag = false; + for (auto& target_cluster : cluster_list) { + if (cur_cluster->get_name() == target_cluster.get_name()) { + // change topo of cur_cluster + if (!prev_cluster && !back_cluster) { + _interval_cluster_root[interval_idx] = nullptr; + } + else if (prev_cluster && !back_cluster) { + prev_cluster->set_back_cluster(""); + } + else if (!prev_cluster && back_cluster) { + _interval_cluster_root[interval_idx] = back_cluster; + back_cluster->set_front_cluster(""); + } + else { + prev_cluster->set_back_cluster(back_cluster_name); + back_cluster->set_front_cluster(prev_cluster_name); + } + changed_flag = true; + this->deleteCluster(cur_cluster->get_name()); + break; + } + } + + if (changed_flag) { + changed_flag = false; + cur_cluster = back_cluster; + } + else { + cur_cluster = back_cluster; + } + } + } + + + void Abacus::insertTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list) { + std::vector> chain_list; + // cluster_list -> chain_list, chain is ordered outside. + int chain_idx = 0; + chain_list.push_back(std::vector{cluster_list[0]}); + for (size_t i = 0, j = i + 1; i < cluster_list.size(); i++, j++) { + if (j >= cluster_list.size()) { + // + break; + } + std::string back_name = cluster_list[i].get_back_cluster(); + if (back_name == cluster_list[j].get_name()) { + chain_list[chain_idx].push_back(cluster_list[j]); + } + else { + chain_list.push_back(std::vector{cluster_list[j]}); + chain_idx++; + } + } + + for (auto& chain : chain_list) { + std::vector cluster_chain; + for (auto& cluster : chain) { + AbacusCluster* c = new AbacusCluster(cluster.get_name()); + // need to set coordi + *c = cluster; + + // update inst coordi and change inst-cluster connection. + int32_t coordi_y = c->get_belong_interval()->get_belong_row()->get_coordinate().get_y(); + int32_t coordi_x = c->get_min_x(); + for (auto* inst : c->get_inst_list()) { + inst->updateCoordi(coordi_x, coordi_y); + coordi_x += inst->get_shape().get_width(); + _inst_belong_cluster[inst->get_index()] = c; + } + cluster_chain.push_back(c); + } + insertClusterChainIntoInterval(interval, cluster_chain); + } + + } + + void Abacus::insertClusterChainIntoInterval(ipl::LGInterval* interval, std::vector& cluster_chain) { + int32_t interval_idx = interval->get_index(); + auto* interval_root = _interval_cluster_root[interval_idx]; + + AbacusCluster* c_head = cluster_chain[0]; + AbacusCluster* c_tail = cluster_chain.back(); + + auto* cur_cluster = interval_root; + if (!cur_cluster) { + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + _interval_cluster_root[interval_idx] = c_head; + return; + } + + // front case + if (c_head->get_min_x() < cur_cluster->get_min_x()) { + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + _interval_cluster_root[interval_idx] = c_head; + cur_cluster->set_front_cluster(c_tail->get_name()); + return; + } + + while (cur_cluster) { + // not front case + std::string back_cluster_name = cur_cluster->get_back_cluster(); + auto* back_cluster = this->findCluster(back_cluster_name); + if (!back_cluster) { + // direct add chain list. + cur_cluster->set_back_cluster(c_head->get_name()); + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + break; + } + else { + if (c_head->get_min_x() >= cur_cluster->get_max_x() && c_head->get_max_x() <= back_cluster->get_min_x()) { + // insert chain list. + cur_cluster->set_back_cluster(c_head->get_name()); + back_cluster->set_front_cluster(c_tail->get_name()); + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + break; + } + cur_cluster = back_cluster; + } + + } + return; + } + + void Abacus::reCalIntervalRemainLength(ipl::LGInterval* interval) { + int32_t interval_idx = interval->get_index(); + int32_t remain_length = (interval->get_max_x() - interval->get_min_x()); + + AbacusCluster* interval_root = _interval_cluster_root[interval_idx]; + AbacusCluster* cur_cluster = interval_root; + AbacusCluster* back_cluster = nullptr; + while (cur_cluster) { + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + + int32_t cluster_width = cur_cluster->get_total_width(); + remain_length -= cluster_width; + cur_cluster = back_cluster; + } + _interval_remain_length[interval_idx] = remain_length; + } + + void Abacus::debugIntervalRemainLength(std::string interval_name) { + auto* interval = _database->get_lg_layout()->find_interval(interval_name); + int32_t interval_idx = interval->get_index(); + int32_t remain_length = (interval->get_max_x() - interval->get_min_x()); + + AbacusCluster* interval_root = _interval_cluster_root[interval_idx]; + AbacusCluster* cur_cluster = interval_root; + AbacusCluster* back_cluster = nullptr; + + std::stringstream info; + info << interval_name << " --- "; + while (cur_cluster) { + info << cur_cluster->get_name() << "(" << cur_cluster->get_inst_list().size() << "," << cur_cluster->get_total_width() << ")" << " -> "; + + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + int32_t cluster_width = cur_cluster->get_total_width(); + remain_length -= cluster_width; + cur_cluster = back_cluster; + } + + info << std::endl; + info << "Expect remain_length: " << remain_length << " ; " << "Actual remain_length: " << _interval_remain_length[interval_idx] << std::endl; + LOG_INFO << info.str(); + } + + std::string Abacus::obtainUniqueClusterName(std::string origin_name){ + std::string unique_name = origin_name; + auto* cluster = this->findCluster(unique_name); + while(cluster){ + unique_name += "_2024"; + cluster = this->findCluster(unique_name); + } + return unique_name; + } + +} // namespace ieda_solver \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.hh" new file mode 100644 index 0000000000000000000000000000000000000000..899b5016841bb7f62aac8136525b9832eb8b0849 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/Abacus.hh" @@ -0,0 +1,107 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#pragma once + +#include +#include +#include + +#include "AbacusCluster.hh" +#include "LGMethodInterface.hh" + +namespace ipl { +class LGInstance; +class LGInterval; +template +class Rectangle; +} // namespace ipl + +namespace ieda_solver { + +struct RollbackInfo +{ + RollbackInfo() : is_dirty(false) {} + ~RollbackInfo() = default; + + bool is_dirty; + // for incremental legalization rollback + std::vector origin_clusters; + std::vector addition_clusters; +}; + +class Abacus : public LGMethodInterface +{ + public: + Abacus() = default; + Abacus(const Abacus&) = delete; + Abacus(Abacus&&) = delete; + ~Abacus(); + + Abacus& operator=(const Abacus&) = delete; + Abacus& operator=(Abacus&&) = delete; + + void initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) override; + bool isInitialized() override; + void specifyTargetInstList(std::vector& target_inst_list) override; + bool runLegalization() override; + bool runIncrLegalization() override; + bool runRollback(bool clear_but_not_rollback) override; + + private: + std::unordered_map _cluster_map; + std::vector _inst_belong_cluster; + std::vector _interval_cluster_root; + std::vector _interval_remain_length; + + int32_t _row_height = -1; + int32_t _site_width = -1; + + std::stack _rollback_stack; + + void pickAndSortMovableInstList(std::vector& movable_inst_list); + int32_t placeRow(ipl::LGInstance* inst, int32_t row_idx, bool is_trial, bool is_record_cluster); + int32_t searchNearestIntervalIndex(std::vector& segment_list, ipl::Rectangle& inst_shape); + int32_t searchRemainSpaceSegIndex(std::vector& segment_list, ipl::Rectangle& inst_shape, int32_t origin_index); + AbacusCluster arrangeInstIntoIntervalCluster(ipl::LGInstance* inst, ipl::LGInterval* interval); + void replaceClusterInfo(AbacusCluster& cluster, bool is_record_cluster); + void arrangeClusterMinXCoordi(AbacusCluster& cluster); + void legalizeCluster(AbacusCluster& cluster); + void mergeWithPreviousCluster(AbacusCluster& cluster, AbacusCluster prev_cluster); + void mergeWithNextCluster(AbacusCluster& cluster, AbacusCluster next_cluster); + int32_t obtainFrontMaxX(AbacusCluster& cluster); + int32_t obtainBackMinX(AbacusCluster& cluster); + + int32_t calDistanceWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x); + bool checkOverlapWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x); + + AbacusCluster* findCluster(std::string cluster_name); + void insertCluster(std::string name, AbacusCluster* cluster); + void deleteCluster(std::string name); + + void updateRemainLength(ipl::LGInterval* interval, int32_t delta); + void splitTargetInst(ipl::LGInstance* inst, RollbackInfo& rollback_info); + void deleteTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list); + void insertTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list); + void insertClusterChainIntoInterval(ipl::LGInterval* interval, std::vector& cluster_chain); + void reCalIntervalRemainLength(ipl::LGInterval* interval); + std::string obtainUniqueClusterName(std::string origin_name); + + void debugIntervalRemainLength(std::string interval_name); +}; + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.cc" new file mode 100644 index 0000000000000000000000000000000000000000..2df0a9e64dcb9a8164aa1a68eb16b6e74701973d --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.cc" @@ -0,0 +1,145 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** +#include "AbacusCluster.hh" + +#include + +#include "LGInstance.hh" +#include "LGInterval.hh" +#include "module/logger/Log.hh" + +namespace ieda_solver { + +AbacusCluster::AbacusCluster(std::string name) + : _name(name), + _belong_segment(nullptr), + _min_x(INT32_MAX), + _weight_e(0.0), + _weight_q(0.0), + _total_width(0), + _front_cluster(""), + _back_cluster("") +{ +} + +AbacusCluster::~AbacusCluster() +{ +} + +int32_t AbacusCluster::get_max_x() +{ + int32_t max_x = _min_x + _total_width; + return max_x; +} + +void AbacusCluster::clearAbacusInfo() +{ + _weight_e = 0.0; + _weight_q = 0.0; + _total_width = 0; +} + +void AbacusCluster::insertInstance(ipl::LGInstance* inst) +{ + int32_t inst_min_x = inst->get_coordi().get_x(); + + int32_t last_min_x = _min_x + _total_width - (*_inst_list.back()).get_shape().get_width(); + if (inst_min_x >= last_min_x) { + appendInst(inst); + _inst_list.push_back(inst); + return; + } + + clearAbacusInfo(); + int32_t front_min_x = _min_x; + int32_t front_max_x = front_min_x; + int32_t index = INT32_MIN; + bool flag_1 = (inst_min_x < front_min_x); + if (flag_1) { + appendInst(inst); + index = 0; + } + for (size_t i = 0; i < _inst_list.size(); i++) { + front_max_x += _inst_list[i]->get_shape().get_width(); + appendInst(_inst_list.at(i)); + bool flag_2 = (inst_min_x >= front_min_x && inst_min_x < front_max_x); + if (flag_2) { + index = i + 1; + appendInst(inst); + } + front_min_x = front_max_x; + } + if (index == INT32_MIN) { + std::cout << "Instance " << inst->get_name() << " cannot insert in the cluster" << std::endl; + return; + } + _inst_list.insert(std::next(_inst_list.begin(), index), inst); + return; +} + +void AbacusCluster::appendCluster(AbacusCluster& cluster) +{ + auto other_inst_list = cluster.get_inst_list(); + _inst_list.insert(_inst_list.end(), other_inst_list.begin(), other_inst_list.end()); + _weight_e += cluster.get_weight_e(); + _weight_q += (cluster.get_weight_q() - cluster.get_weight_e() * _total_width); + _total_width += cluster.get_total_width(); +} + +void AbacusCluster::appendInst(ipl::LGInstance* inst) +{ + _weight_e += inst->get_weight(); + _weight_q += inst->get_weight() * (inst->get_coordi().get_x() - _total_width); + _total_width += inst->get_shape().get_width(); +} + +void AbacusCluster::appendInstList(std::vector inst_list){ + for(auto* inst : inst_list){ + this->appendInst(inst); + } + _inst_list = inst_list; +} + +void AbacusCluster::updateAbacusInfo() +{ + clearAbacusInfo(); + for (size_t i = 0; i < _inst_list.size(); i++) { + appendInst(_inst_list[i]); + } +} + +int32_t AbacusCluster::obtainInstIdx(ipl::LGInstance* inst) +{ + int32_t inst_idx = -1; + for (size_t i = 0; i < _inst_list.size(); i++) { + if (inst == _inst_list[i]) { + inst_idx = i; + break; + } + } + return inst_idx; +} + +void AbacusCluster::eraseTargetInstByIdx(int32_t idx){ + _inst_list.erase(_inst_list.begin() + idx); +} + +void AbacusCluster::eraseTargetInstByIdxPair(int32_t begin_idx, int32_t end_idx){ + _inst_list.erase(_inst_list.begin()+begin_idx, _inst_list.begin() + end_idx + 1); +} + +} // namespace ieda_solver \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.hh" new file mode 100644 index 0000000000000000000000000000000000000000..f8132c37d7ccc5be76aa1c4b5516a45c4cc62538 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/abacus/AbacusCluster.hh" @@ -0,0 +1,135 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** +#pragma once + +#include +#include + +namespace ipl { +class LGInstance; +class LGInterval; +} // namespace ipl + +namespace ieda_solver { + +class AbacusCluster +{ + public: + AbacusCluster() = default; + explicit AbacusCluster(std::string name); + + AbacusCluster(const AbacusCluster& other) + { + _name = other._name; + _inst_list = other._inst_list; + _belong_segment = other._belong_segment; + _min_x = other._min_x; + _weight_e = other._weight_e; + _weight_q = other._weight_q; + _total_width = other._total_width; + _front_cluster = other._front_cluster; + _back_cluster = other._back_cluster; + } + AbacusCluster(AbacusCluster&& other) + { + _name = std::move(other._name); + _inst_list = std::move(other._inst_list); + _belong_segment = std::move(other._belong_segment); + _min_x = std::move(other._min_x); + _weight_e = std::move(other._weight_e); + _weight_q = std::move(other._weight_q); + _total_width = std::move(other._total_width); + _front_cluster = std::move(other._front_cluster); + _back_cluster = std::move(other._back_cluster); + } + ~AbacusCluster(); + + AbacusCluster& operator=(const AbacusCluster& other) + { + _name = other._name; + _inst_list = other._inst_list; + _belong_segment = other._belong_segment; + _min_x = other._min_x; + _weight_e = other._weight_e; + _weight_q = other._weight_q; + _total_width = other._total_width; + _front_cluster = other._front_cluster; + _back_cluster = other._back_cluster; + return (*this); + } + AbacusCluster& operator=(AbacusCluster&& other) + { + _name = std::move(other._name); + _inst_list = std::move(other._inst_list); + _belong_segment = std::move(other._belong_segment); + _min_x = std::move(other._min_x); + _weight_e = std::move(other._weight_e); + _weight_q = std::move(other._weight_q); + _total_width = std::move(other._total_width); + _front_cluster = std::move(other._front_cluster); + _back_cluster = std::move(other._back_cluster); + return (*this); + } + + // getter + std::string get_name() const { return _name; } + std::vector get_inst_list() const { return _inst_list; } + ipl::LGInterval* get_belong_interval() const { return _belong_segment; } + int32_t get_min_x() const { return _min_x; } + int32_t get_max_x(); + double get_weight_e() const { return _weight_e; } + double get_weight_q() const { return _weight_q; } + int32_t get_total_width() const { return _total_width; } + std::string get_front_cluster() const { return _front_cluster; } + std::string get_back_cluster() const { return _back_cluster; } + + // setter + void set_name(std::string name) { _name = name; } + void add_inst(ipl::LGInstance* inst) { _inst_list.push_back(inst); } + void set_belong_interval(ipl::LGInterval* seg) { _belong_segment = seg; } + void set_min_x(int32_t min_x) { _min_x = min_x; } + void set_front_cluster(std::string cluster) { _front_cluster = cluster; } + void set_back_cluster(std::string cluster) { + _back_cluster = cluster; + } + + + // function + void clearAbacusInfo(); + void updateAbacusInfo(); + void insertInstance(ipl::LGInstance* inst); + void appendCluster(AbacusCluster& cluster); + void appendInst(ipl::LGInstance* inst); + void appendInstList(std::vector inst_list); + int32_t obtainInstIdx(ipl::LGInstance* inst); + void eraseTargetInstByIdx(int32_t idx); + void eraseTargetInstByIdxPair(int32_t begin_idx, int32_t end_idx); + + private: + std::string _name; + std::vector _inst_list; + ipl::LGInterval* _belong_segment; + + int32_t _min_x; + double _weight_e; + double _weight_q; + int32_t _total_width; + + std::string _front_cluster; + std::string _back_cluster; +}; +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.cc" new file mode 100644 index 0000000000000000000000000000000000000000..07a7608330a946375c12484b6723ae93ba63f21b --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.cc" @@ -0,0 +1,62 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#include "LGCustomization.hh" + +#include "LGDatabase.hh" +#include "LGInstance.hh" +#include "LGInterval.hh" + +namespace ieda_solver { + +LGCustomization::LGCustomization() +{ +} + +LGCustomization::~LGCustomization() +{ +} + +void LGCustomization::initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) +{ +} + +bool LGCustomization::isInitialized() +{ + return true; +} + +void LGCustomization::specifyTargetInstList(std::vector& target_inst_list) +{ +} + +bool LGCustomization::runLegalization() +{ + return true; +} + +bool LGCustomization::runIncrLegalization() +{ + return true; +} + +bool LGCustomization::runRollback(bool clear_but_not_rollback) +{ + return true; +} + +} // namespace ieda_solver \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.hh" new file mode 100644 index 0000000000000000000000000000000000000000..89b53d3e3e7b1117c576599c29955ffa1608a550 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/customization/LGCustomization.hh" @@ -0,0 +1,52 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#pragma once + +#include "LGMethodInterface.hh" + +namespace ipl { +class LGInstance; +class LGInterval; +template +class Rectangle; +} // namespace ipl + +namespace ieda_solver { + +class LGCustomization : public LGMethodInterface +{ + public: + LGCustomization(); + LGCustomization(const LGCustomization&) = delete; + LGCustomization(LGCustomization&&) = delete; + ~LGCustomization(); + + LGCustomization& operator=(const LGCustomization&) = delete; + LGCustomization& operator=(LGCustomization&&) = delete; + + void initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) override; + bool isInitialized() override; + void specifyTargetInstList(std::vector& target_inst_list) override; + bool runLegalization() override; + bool runIncrLegalization() override; + bool runRollback(bool clear_but_not_rollback) override; + + private: +}; + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.cc" new file mode 100644 index 0000000000000000000000000000000000000000..5db919755d757ecfb7f01559644592a5421d76e6 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.cc" @@ -0,0 +1,1243 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#include "Tetris.hh" + +#include +#include + +#include "LGDatabase.hh" +#include "LGInstance.hh" +#include "LGInterval.hh" + +namespace ieda_solver { + + Tetris::~Tetris() + { + for (auto pair : _cluster_map) { + delete pair.second; + } + _cluster_map.clear(); + _inst_belong_cluster.clear(); + _interval_cluster_root.clear(); + _interval_remain_length.clear(); + } + + void Tetris::initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) + { + // clean Tetris info first. + _cluster_map.clear(); + _inst_belong_cluster.clear(); + _interval_cluster_root.clear(); + _interval_remain_length.clear(); + + _database = lg_database; + _config = lg_config; + + _inst_belong_cluster.resize(_database->get_lgInstance_list().size(), nullptr); + + int32_t interval_cnt = 0; + for (auto& interval_vec : _database->get_lg_layout()->get_interval_2d_list()) { + for (auto* interval : interval_vec) { + interval_cnt++; + _interval_remain_length.push_back(interval->get_max_x() - interval->get_min_x()); + } + } + _interval_cluster_root.resize(interval_cnt, nullptr); + + _row_height = _database->get_lg_layout()->get_row_height(); + _site_width = _database->get_lg_layout()->get_site_width(); + } + + bool Tetris::isInitialized() + { + return !_cluster_map.empty(); + } + + void Tetris::specifyTargetInstList(std::vector& target_inst_list) + { + _target_inst_list.clear(); + _target_inst_list = target_inst_list; + } + + bool Tetris::runLegalization() + { + // 对所有可移动单元进行排序,使用 effective_x 排序 + std::vector movable_inst_list; + pickAndSortMovableInstList(movable_inst_list); + + // 遍历所有可移动单元 + for (auto* inst : movable_inst_list) { + // 获取当前布局的行高 + int32_t row_height = _database->get_lg_layout()->get_row_height(); + // 根据单元的 y 坐标计算初始的行索引 + int32_t row_idx = int32_t(inst->get_coordi().get_y() / row_height); + + // 初始行的放置代价 + int32_t row_avail = INT32_MAX; + int32_t row_cost = INT32_MAX; + // 尝试在初始行放置单元 + int32_t cost = placeRow(inst, row_idx, false, false); + // 在附近的行中寻找更好的放置位置 + for (int i = 1;;i++) { + // 如果在当前行的放置是有效的(代价不为最大值),则停止搜索 + if (cost != INT32_MAX) { + break; + } + // 如果超出了可用的行范围,则停止搜索 + if (row_idx + i >= _database->get_lg_layout()->get_row_num() && row_idx - i < 0) { + break; + } + // 尝试在向上的第 i 行放置单元 + if (row_idx + i < _database->get_lg_layout()->get_row_num()) { + cost = placeRow(inst, row_idx + i, true, false); + if (cost < row_cost) { + row_cost = cost; + row_avail = row_idx + i; + } + } + // 尝试在向下的第 i 行放置单元 + if (row_idx - i >= 0) { + cost = placeRow(inst, row_idx - i, true, false); + if (cost < row_cost) { + row_cost = cost; + row_avail = row_idx - i; + } + } + } + // 如果找到了一个比初始行更合适的行,并且行索引不同,则将单元放置在该行 + if (row_avail != INT32_MAX && row_avail != row_idx) { + placeRow(inst, row_avail, false, false); + } + } + return true; + } + + // bool Tetris::runLegalization() + // { + // // Sort all movable instances + // std::vector movable_inst_list; + // pickAndSortMovableInstList(movable_inst_list); + + // int32_t inst_id = 0; + // for (auto* inst : movable_inst_list) { + + // int32_t best_row = INT32_MAX; + // int32_t best_cost = INT32_MAX; + // for (int32_t row_idx = 0; row_idx < _database->get_lg_layout()->get_row_num(); row_idx++) { + // int32_t cost = placeRow(inst, row_idx, true, false); + + // if (cost < best_cost) { + // best_cost = cost; + // best_row = row_idx; + // } + // } + + // if (best_row == INT32_MAX) { + // LOG_ERROR << "Instance: " << inst->get_name() << "Cannot find a row for placement"; + // return false; + // } + + // placeRow(inst, best_row, false, false); + + // inst_id++; + // if (inst_id % 100000 == 0) { + // LOG_INFO << "Place Instance : " << inst_id; + // } + // } + + // return true; + // } + + bool Tetris::runIncrLegalization() + { + int32_t row_range_num = 5; + int32_t row_num = _database->get_lg_layout()->get_row_num(); + + // spilt new inst from the cluster. + RollbackInfo2 rollback_info; + for (auto* inst : _target_inst_list) { + splitTargetInst(inst, rollback_info); + } + rollback_info.is_dirty = true; + _rollback_stack.push(rollback_info); + + for (auto* inst : _target_inst_list) { + int32_t row_idx = inst->get_coordi().get_y() / _row_height; + int32_t max_row_idx = (row_idx + row_range_num > row_num) ? row_num : row_idx + row_range_num; + int32_t min_row_idx = (row_idx - row_range_num < 0) ? 0 : row_idx - row_range_num; + + int32_t best_row = INT32_MAX; + int32_t best_cost = INT32_MAX; + for (int32_t row_idx = min_row_idx; row_idx < max_row_idx; row_idx++) { + int32_t cost = placeRow(inst, row_idx, true, false); + if (cost < best_cost) { + best_cost = cost; + best_row = row_idx; + } + } + placeRow(inst, best_row, false, true); + } + + return true; + } + + // void Tetris::pickAndSortMovableInstList(std::vector& movable_inst_list) + // { + // double max_weight = INT32_MIN; + // double min_weight = INT32_MAX; + // double radio = 0.05; // 单元宽度权重 + + // for (auto* inst : _database->get_lgInstance_list()) { + // if (inst->get_state() == ipl::LGINSTANCE_STATE::kFixed) { + // continue; + // } + // // 设置单元归一化权重 + // max_weight = max_weight < (1 - radio) * inst->get_coordi().get_x() - radio * inst->get_shape().get_width() + // ? (1 - radio) * inst->get_coordi().get_x() - radio * inst->get_shape().get_width() + // : max_weight; + // min_weight = min_weight > (1 - radio) * inst->get_coordi().get_x() - radio * inst->get_shape().get_width() + // ? (1 - radio) * inst->get_coordi().get_x() - radio * inst->get_shape().get_width() + // : min_weight; + // movable_inst_list.push_back(inst); + // } + + // for (auto* inst : movable_inst_list) { + // inst->set_weight((max_weight - (1 - radio) * inst->get_coordi().get_x() + radio * inst->get_shape().get_width()) + // / (max_weight - min_weight)); + // } + + // // 根据权重进行排序 + // std::sort(movable_inst_list.begin(), movable_inst_list.end(), + // [](ipl::LGInstance* l_inst, ipl::LGInstance* r_inst) { + // return l_inst->get_weight() > r_inst->get_weight(); + // }); + // } + + void Tetris::pickAndSortMovableInstList(std::vector& movable_inst_list) + { + float width_factor = 0.2; + + // 遍历数据库中的所有单元实例 + for (auto* inst : _database->get_lgInstance_list()) { + // 跳过状态为固定的单元实例,因为这些单元不能移动 + if (inst->get_state() == ipl::LGINSTANCE_STATE::kFixed) { + continue; + } + // 将可以移动的单元实例添加到列表中 + movable_inst_list.push_back(inst); + } + + std::sort(movable_inst_list.begin(), movable_inst_list.end(), [width_factor](ipl::LGInstance* l_inst, ipl::LGInstance* r_inst) { + // 计算左侧单元实例的 effective_x 值 + float effective_x_l = l_inst->get_coordi().get_x() - l_inst->get_shape().get_width() * width_factor; + // 计算右侧单元实例的 effective_x 值 + float effective_x_r = r_inst->get_coordi().get_x() - r_inst->get_shape().get_width() * width_factor; + // 根据 effective_x 值从小到大排序 + return effective_x_l < effective_x_r; + }); + } + + int32_t Tetris::placeRow(ipl::LGInstance* inst, int32_t row_idx, bool is_trial, bool is_record_cluster) + { + ipl::Rectangle inst_shape = std::move(inst->get_shape()); + + // Determine clusters and their optimal positions x_c(c): + std::vector interval_list = _database->get_lg_layout()->get_interval_2d_list()[row_idx]; + + // Select the nearest interval for the instance + int32_t row_interval_idx = searchNearestIntervalIndex(interval_list, inst_shape); + if (row_interval_idx == INT32_MAX) { + // std::cout << "Instance is not overlap with interval!" << std::endl; + return INT32_MAX; + } + + if (_interval_remain_length[interval_list[row_interval_idx]->get_index()] < inst_shape.get_width()) { + // Select the most recent non-full interval + int32_t origin_idx = row_interval_idx; + row_interval_idx = searchRemainSpaceSegIndex(interval_list, inst_shape, origin_idx); + if (row_interval_idx == origin_idx) { + // LOG_INFO << "Row : " << row_idx << " has no room to place."; + return INT32_MAX; + } + } + + // Arrange inst into interval + auto* target_interval = interval_list[row_interval_idx]; + TetrisCluster target_cluster = std::move(arrangeInstIntoIntervalCluster(inst, target_interval)); + + // Calculate cost + int32_t movement_cost = 0; + int32_t coordi_x = target_cluster.get_min_x(); + int32_t inst_movement_x = INT32_MAX; + for (auto* target_inst : target_cluster.get_inst_list()) { + int32_t origin_x = target_inst->get_coordi().get_x(); + if (target_inst == inst) { + inst_movement_x = std::abs(coordi_x - origin_x); + } + else { + movement_cost += std::abs(coordi_x - origin_x); + } + coordi_x += target_inst->get_shape().get_width(); + } + // Add Inst Coordi Movement Cost + int32_t inst_movement_y = std::abs(row_idx * _row_height - inst_shape.get_ll_y()); + int32_t inst_displacement = inst_movement_x + inst_movement_y; + movement_cost += inst_displacement; + + // Penalize violations of maximum movement constraints + if (inst_displacement > _config->get_max_displacement()) { + movement_cost += _database->get_lg_layout()->get_max_x(); + } + + // Replace cluster + + if (!is_trial) { + replaceClusterInfo(target_cluster, is_record_cluster); + this->updateRemainLength(target_interval, -(inst->get_shape().get_width())); + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***placeRow***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + return movement_cost; + } + + int32_t Tetris::searchNearestIntervalIndex(std::vector& segment_list, ipl::Rectangle& inst_shape) + { + if (segment_list.size() == 1) { + return 0; + } + + int32_t prev_distance = INT32_MAX; + int32_t segment_idx = INT32_MAX; + for (size_t i = 0; i < segment_list.size(); i++) { + int32_t cur_distance + = calDistanceWithBox(inst_shape.get_ll_x(), inst_shape.get_ur_x(), segment_list[i]->get_min_x(), segment_list[i]->get_max_x()); + if (cur_distance > prev_distance) { + segment_idx = i - 1; + break; + } + if (cur_distance == 0) { + segment_idx = i; + break; + } + + prev_distance = cur_distance; + } + + return segment_idx; + } + + int32_t Tetris::calDistanceWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x) + { + if (max_x >= box_min_x && min_x <= box_max_x) { + return 0; + } + else if (min_x > box_max_x) { + return (min_x - box_max_x); + } + else if (max_x < box_min_x) { + return (box_min_x - max_x); + } + else { + return INT32_MAX; + } + } + + int32_t Tetris::searchRemainSpaceSegIndex(std::vector& segment_list, ipl::Rectangle& inst_shape, + int32_t origin_index) + { + int32_t segment_idx = origin_index; + // int32_t max_range = segment_list.size() - 1; + int32_t max_range = 2; + int32_t range = 1; + while (range <= max_range) { + int32_t r_idx = segment_idx; + if (r_idx + range < static_cast(segment_list.size())) { + r_idx += range; + int32_t interval_idx = segment_list[r_idx]->get_index(); + if (_interval_remain_length[interval_idx] >= inst_shape.get_width()) { + segment_idx = r_idx; + break; + } + } + int32_t l_idx = segment_idx; + if (l_idx - range >= 0) { + l_idx -= range; + int32_t interval_idx = segment_list[l_idx]->get_index(); + if (_interval_remain_length[interval_idx] >= inst_shape.get_width()) { + segment_idx = l_idx; + break; + } + } + range++; + } + return segment_idx; + } + + TetrisCluster Tetris::arrangeInstIntoIntervalCluster(ipl::LGInstance* inst, ipl::LGInterval* interval) + { + auto inst_shape = std::move(inst->get_shape()); + TetrisCluster record_cluster; + auto* cur_cluster = _interval_cluster_root[interval->get_index()]; + auto* last_cluster = cur_cluster; + bool is_collapse = false; + + if (cur_cluster && (inst_shape.get_ur_x() < cur_cluster->get_min_x())) { + // should insert in the cluster + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + } + else { + while (cur_cluster) { + if (checkOverlapWithBox(inst_shape.get_ll_x(), inst_shape.get_ur_x(), cur_cluster->get_min_x(), cur_cluster->get_max_x())) { + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + break; + } + auto* back_cluster = findCluster(cur_cluster->get_back_cluster()); + if (back_cluster) { + // tmp fix bug. + if (inst_shape.get_ll_x() >= cur_cluster->get_max_x() && inst_shape.get_ur_x() <= back_cluster->get_min_x()) { + record_cluster = *cur_cluster; + record_cluster.insertInstance(inst); + legalizeCluster(record_cluster); + is_collapse = true; + break; + } + + last_cluster = back_cluster; + } + cur_cluster = back_cluster; + } + } + + if (!is_collapse) { + // Create new cluster + std::string cluster_name = obtainUniqueClusterName(inst->get_name()); + record_cluster = TetrisCluster(cluster_name); + + // auto* exist_cluster = findCluster(inst->get_name()); + // if (exist_cluster) { + // record_cluster = TetrisCluster(exist_cluster->get_name() + "_2024"); + // } + // else { + // record_cluster = TetrisCluster(inst->get_name()); + // } + // // record_cluster = TetrisCluster(inst->get_name()); + + record_cluster.add_inst(inst); + record_cluster.appendInst(inst); + record_cluster.set_belong_interval(interval); + if (last_cluster) { + record_cluster.set_front_cluster(last_cluster->get_name()); + } + legalizeCluster(record_cluster); + } + + return record_cluster; + } + + void Tetris::legalizeCluster(TetrisCluster& cluster) + { + arrangeClusterMinXCoordi(cluster); + int32_t cur_min_x, front_max_x, back_min_x; + cur_min_x = cluster.get_min_x(); + front_max_x = obtainFrontMaxX(cluster); + + back_min_x = obtainBackMinX(cluster); + while ((cur_min_x < front_max_x) || (cur_min_x + cluster.get_total_width() > back_min_x)) { + while (cur_min_x < front_max_x) { + TetrisCluster front_cluster = *(this->findCluster(cluster.get_front_cluster())); + mergeWithPreviousCluster(cluster, front_cluster); + arrangeClusterMinXCoordi(cluster); + cur_min_x = cluster.get_min_x(); + front_max_x = obtainFrontMaxX(cluster); + + // front_cluster.appendCluster(cluster); + + // front_cluster.set_back_cluster(cluster.get_back_cluster()); + // arrangeClusterMinXCoordi(front_cluster); + // cur_min_x = front_cluster.get_min_x(); + // front_max_x = obtainFrontMaxX(front_cluster); + // cluster = front_cluster; + } + + cur_min_x = cluster.get_min_x(); + back_min_x = obtainBackMinX(cluster); + while (cur_min_x + cluster.get_total_width() > back_min_x) { + auto* back_cluster = this->findCluster(cluster.get_back_cluster()); + mergeWithNextCluster(cluster, *back_cluster); + + // cluster.appendCluster(*back_cluster); + // cluster.set_back_cluster(back_cluster->get_back_cluster()); + arrangeClusterMinXCoordi(cluster); + cur_min_x = cluster.get_min_x(); + back_min_x = obtainBackMinX(cluster); + } + } + } + + void Tetris::mergeWithPreviousCluster(TetrisCluster& cluster, TetrisCluster prev_cluster) + { + TetrisCluster tmp_cluster(cluster.get_name()); + tmp_cluster.set_belong_interval(cluster.get_belong_interval()); + tmp_cluster.appendInstList(prev_cluster.get_inst_list()); + tmp_cluster.appendCluster(cluster); + + tmp_cluster.set_front_cluster(prev_cluster.get_front_cluster()); + tmp_cluster.set_back_cluster(cluster.get_back_cluster()); + + cluster = std::move(tmp_cluster); + } + + void Tetris::mergeWithNextCluster(TetrisCluster& cluster, TetrisCluster next_cluster) + { + cluster.appendCluster(next_cluster); + cluster.set_back_cluster(next_cluster.get_back_cluster()); + } + + void Tetris::arrangeClusterMinXCoordi(TetrisCluster& cluster) + { + int32_t cluster_x = (cluster.get_weight_q() / cluster.get_weight_e()); + cluster_x = (cluster_x / _site_width) * _site_width; + + int32_t boundary_min_x = cluster.get_belong_interval()->get_min_x(); + int32_t boundary_max_x = cluster.get_belong_interval()->get_max_x(); + cluster_x < boundary_min_x ? cluster_x = boundary_min_x : cluster_x; + cluster_x + cluster.get_total_width() > boundary_max_x ? cluster_x = boundary_max_x - cluster.get_total_width() : cluster_x; + + if (cluster_x < boundary_min_x) { + std::cout << "Cluster width is out of interval capcity" << std::endl; + } + + cluster.set_min_x(cluster_x); + } + + int32_t Tetris::obtainFrontMaxX(TetrisCluster& cluster) + { + int32_t front_max_x = cluster.get_belong_interval()->get_min_x(); + auto* front_cluster = this->findCluster(cluster.get_front_cluster()); + if (front_cluster) { + front_max_x = front_cluster->get_max_x(); + } + return front_max_x; + } + + int32_t Tetris::obtainBackMinX(TetrisCluster& cluster) + { + int32_t back_min_x = cluster.get_belong_interval()->get_max_x(); + auto* back_cluster = this->findCluster(cluster.get_back_cluster()); + if (back_cluster) { + back_min_x = back_cluster->get_min_x(); + } + return back_min_x; + } + + bool Tetris::checkOverlapWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x) + { + if (max_x > box_min_x && min_x < box_max_x) { + return true; + } + else { + return false; + } + } + + void Tetris::replaceClusterInfo(TetrisCluster& modify_cluster, bool is_record_cluster) + { + auto* origin_interval = modify_cluster.get_belong_interval(); + int32_t coordi_y = origin_interval->get_belong_row()->get_coordinate().get_y(); + + // record rollback info + RollbackInfo2 rollback_info; + + auto* cluster_ptr = this->findCluster(modify_cluster.get_name()); + std::string origin_back_cluster_name = ""; + if (!cluster_ptr) { + TetrisCluster* new_cluster = new TetrisCluster(modify_cluster); + this->insertCluster(new_cluster->get_name(), new_cluster); + cluster_ptr = new_cluster; + + if (is_record_cluster) { + rollback_info.addition_clusters.push_back(modify_cluster); + } + } + else { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*cluster_ptr); + rollback_info.addition_clusters.push_back(modify_cluster); + } + + origin_back_cluster_name = cluster_ptr->get_back_cluster(); + *cluster_ptr = std::move(modify_cluster); + } + + auto* origin_root = _interval_cluster_root[origin_interval->get_index()]; + std::string front_cluster_name = cluster_ptr->get_front_cluster(); + std::string back_cluster_name = cluster_ptr->get_back_cluster(); + auto* front_cluster = this->findCluster(front_cluster_name); + auto* back_cluster = this->findCluster(back_cluster_name); + + // front cluster case + if (!origin_root && !front_cluster) { + // cur cluster is root + _interval_cluster_root[origin_interval->get_index()] = cluster_ptr; + } + else if (origin_root && !front_cluster) { + // from origin root to cur cluster need to erase. + auto* tmp_cluster = origin_root; + while (tmp_cluster->get_name() != cluster_ptr->get_name()) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + if (!tmp_cluster) { + break; + } + } + _interval_cluster_root[origin_interval->get_index()] = cluster_ptr; + } + else if (!origin_root && front_cluster) { + LOG_ERROR << "Interval root is not recorded!!!"; + } + else { + // from front cluster to cur cluster need to erase. + auto* tmp_cluster = this->findCluster(front_cluster->get_back_cluster()); + while (tmp_cluster && (tmp_cluster->get_name() != cluster_ptr->get_name())) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + } + + // back cluster case + auto* origin_back_cluster = this->findCluster(origin_back_cluster_name); + if (!back_cluster && !origin_back_cluster) { + // + } + else if (back_cluster && !origin_back_cluster) { + LOG_ERROR << "Back cluster is not recorded !!!"; + } + else if (!back_cluster && origin_back_cluster) { + auto* tmp_cluster = origin_back_cluster; + while (tmp_cluster) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + } + else { + // from origin_back_cluster to back_cluster need to erase. + auto* tmp_cluster = origin_back_cluster; + while (tmp_cluster && (tmp_cluster->get_name() != back_cluster->get_name())) { + if (is_record_cluster) { + rollback_info.origin_clusters.push_back(*tmp_cluster); + } + + std::string delete_cluster_name = tmp_cluster->get_name(); + tmp_cluster = this->findCluster(tmp_cluster->get_back_cluster()); + this->deleteCluster(delete_cluster_name); + } + } + + if (front_cluster) { + front_cluster->set_back_cluster(cluster_ptr->get_name()); + } + if (back_cluster) { + back_cluster->set_front_cluster(cluster_ptr->get_name()); + } + + // update all inst info + int32_t coordi_x = cluster_ptr->get_min_x(); + for (auto* inst : cluster_ptr->get_inst_list()) { + _inst_belong_cluster[inst->get_index()] = cluster_ptr; + inst->updateCoordi(coordi_x, coordi_y); + coordi_x += inst->get_shape().get_width(); + } + + // record + if (is_record_cluster) { + rollback_info.is_dirty = true; + _rollback_stack.push(rollback_info); + } + } + + // void Tetris::replaceClusterInfo(TetrisCluster& modify_cluster, bool is_record_cluster) + // { + // auto* origin_interval = modify_cluster.get_belong_interval(); + // int32_t coordi_y = origin_interval->get_belong_row()->get_coordinate().get_y(); + + // auto* cluster_ptr = this->findCluster(modify_cluster.get_name()); + // if (!cluster_ptr) { + // TetrisCluster* new_cluster = new TetrisCluster(std::move(modify_cluster)); + // auto inst_list = new_cluster->get_inst_list(); + // if (inst_list.size() > 1 || inst_list.size() == 0) { + // std::cout << "Cluster Inst is not correctly set" << std::endl; + // } + + // // cluster setting. + // _inst_belong_cluster[inst_list[0]->get_index()] = new_cluster; + // inst_list[0]->updateCoordi(new_cluster->get_min_x(), coordi_y); + + // this->insertCluster(new_cluster->get_name(), new_cluster); + + // // front cluster. + // std::string front_cluster_name = new_cluster->get_front_cluster(); + // std::string back_cluster_name = new_cluster->get_back_cluster(); + // auto* front_cluster = findCluster(front_cluster_name); + // auto* back_cluster = findCluster(back_cluster_name); + // if (front_cluster) { + // front_cluster->set_back_cluster(new_cluster->get_name()); + + // // assert + // if (back_cluster) { + // if (back_cluster_name != new_cluster->get_back_cluster()) { + // LOG_WARNING << "Unrecord back cluster!!!"; + // } + // } + // } + // else { + // if (_interval_cluster_root[origin_interval->get_index()]) { + // LOG_WARNING << "Unrecord front cluster!!!"; + // } + // else { + // _interval_cluster_root[origin_interval->get_index()] = new_cluster; + // } + // } + + // if (back_cluster) { + // back_cluster->set_front_cluster(new_cluster->get_name()); + // } + + // if (is_record_cluster) { + // RollbackInfo2 rollback_info; + // rollback_info.is_dirty = true; + // rollback_info.addition_clusters.push_back(*new_cluster); + // _rollback_stack.push(rollback_info); + // } + // return; + // } + + // auto& origin_cluster = *(cluster_ptr); + // auto* origin_root = _interval_cluster_root[origin_interval->get_index()]; + + // // record rollback info + // RollbackInfo2 rollback_info; + + // // may be collapsing with front or back cluster + // TetrisCluster* front_origin = this->findCluster(origin_cluster.get_front_cluster()); + // TetrisCluster* front_modify = this->findCluster(modify_cluster.get_front_cluster()); + // while (front_origin != front_modify) { + // if (is_record_cluster && front_origin) { + // rollback_info.origin_clusters.push_back(*front_origin); + // } + + // if (front_origin == origin_root) { + // _interval_cluster_root[origin_interval->get_index()] = &origin_cluster; + // } + + // std::string delete_cluster = front_origin->get_name(); + // front_origin = this->findCluster(front_origin->get_front_cluster()); + // if (front_origin) { + // front_origin->set_back_cluster(origin_cluster.get_name()); + // } + // this->deleteCluster(delete_cluster); + // } + + // // test + // if (is_record_cluster) { + // rollback_info.addition_clusters.push_back(modify_cluster); + // rollback_info.origin_clusters.push_back(origin_cluster); + // } + + // TetrisCluster* back_origin = this->findCluster(origin_cluster.get_back_cluster()); + // TetrisCluster* back_modify = this->findCluster(modify_cluster.get_back_cluster()); + // while (back_origin != back_modify) { + // if (is_record_cluster && back_origin) { + // rollback_info.origin_clusters.push_back(*back_origin); + // } + + // std::string delete_cluster = back_origin->get_name(); + + // back_origin = this->findCluster(back_origin->get_back_cluster()); + // if (back_origin) { + // back_origin->set_front_cluster(origin_cluster.get_name()); + // } + // this->deleteCluster(delete_cluster); + // } + + // // update all inst info + // origin_cluster = std::move(modify_cluster); + // int32_t coordi_x = origin_cluster.get_min_x(); + // for (auto* inst : origin_cluster.get_inst_list()) { + // _inst_belong_cluster[inst->get_index()] = &origin_cluster; + // inst->updateCoordi(coordi_x, coordi_y); + // coordi_x += inst->get_shape().get_width(); + // } + + // // final push rollback stack + // if (is_record_cluster) { + // rollback_info.is_dirty = true; + // _rollback_stack.push(rollback_info); + // } + // } + + TetrisCluster* Tetris::findCluster(std::string cluster_name) + { + if (cluster_name == "") { + return nullptr; + } + TetrisCluster* cluster = nullptr; + auto it = _cluster_map.find(cluster_name); + if (it != _cluster_map.end()) { + cluster = it->second; + } + + return cluster; + } + + void Tetris::insertCluster(std::string name, TetrisCluster* cluster) + { + auto it = _cluster_map.find(name); + if (it != _cluster_map.end()) { + std::cout << "Cluster : " << name << " was added before" << std::endl; + } + _cluster_map.emplace(name, cluster); + } + + void Tetris::deleteCluster(std::string name) + { + auto it = _cluster_map.find(name); + if (it != _cluster_map.end()) { + _cluster_map.erase(it); + } + else { + std::cout << "Cluster: " << name << " has not been insert" << std::endl; + } + } + + void Tetris::updateRemainLength(ipl::LGInterval* interval, int32_t delta) + { + int32_t cur_value = _interval_remain_length[interval->get_index()]; + _interval_remain_length[interval->get_index()] = cur_value + delta; + } + + void Tetris::splitTargetInst(ipl::LGInstance* inst, RollbackInfo2& rollback_info) + { + int32_t inst_width = inst->get_shape().get_width(); + auto* target_cluster = _inst_belong_cluster[inst->get_index()]; + ipl::LGInterval* target_interval = target_cluster->get_belong_interval(); + int32_t target_size = target_cluster->get_inst_list().size(); + + rollback_info.origin_clusters.push_back(*target_cluster); + + if (target_size == 1) { + auto* front_cluster = this->findCluster(target_cluster->get_front_cluster()); + auto* back_cluster = this->findCluster(target_cluster->get_back_cluster()); + if (!front_cluster && !back_cluster) { + // + } + else if (!front_cluster && back_cluster) { + back_cluster->set_front_cluster(""); + } + else if (front_cluster && !back_cluster) { + front_cluster->set_back_cluster(""); + } + else { + front_cluster->set_back_cluster(back_cluster->get_name()); + back_cluster->set_front_cluster(front_cluster->get_name()); + } + + // move the root + if (_interval_cluster_root[target_interval->get_index()]->get_name() == target_cluster->get_name()) { + _interval_cluster_root[target_interval->get_index()] = back_cluster; + } + + deleteCluster(target_cluster->get_name()); + } + else { + int32_t inst_idx = target_cluster->obtainInstIdx(inst); + if (inst_idx == -1) { + LOG_WARNING << "Inst is not in target cluster!!!"; + return; + } + + if ((inst_idx == 0) || (inst_idx == target_size - 1)) { + target_cluster->eraseTargetInstByIdx(inst_idx); + int32_t min_x = target_cluster->get_inst_list().front()->get_coordi().get_x(); + target_cluster->set_min_x(min_x); + target_cluster->updateTetrisInfo(); + } + else if ((inst_idx > 0) && (inst_idx < target_size)) { + // split cluster + std::vector origin_inst_list = target_cluster->get_inst_list(); + std::vector new_inst_list(origin_inst_list.begin() + inst_idx + 1, origin_inst_list.end()); + target_cluster->eraseTargetInstByIdxPair(inst_idx, target_size - 1); + target_cluster->updateTetrisInfo(); + + // add new cluster + ipl::LGInstance* flag_inst = new_inst_list[0]; + + TetrisCluster* new_cluster; + std::string cluster_name = obtainUniqueClusterName(flag_inst->get_name()); + new_cluster = new TetrisCluster(cluster_name); + + // auto* exist_cluster = findCluster(flag_inst->get_name()); + // if (exist_cluster) { + // new_cluster = new TetrisCluster(exist_cluster->get_name() + "_2024"); + // } + // else { + // new_cluster = new TetrisCluster(flag_inst->get_name()); + // } + + new_cluster->appendInstList(new_inst_list); + new_cluster->set_min_x(flag_inst->get_coordi().get_x()); + // update inst to cluster + for (auto* inst : new_cluster->get_inst_list()) { + _inst_belong_cluster[inst->get_index()] = new_cluster; + } + + new_cluster->updateTetrisInfo(); + new_cluster->set_belong_interval(target_interval); + new_cluster->set_front_cluster(target_cluster->get_name()); + std::string back_cluster_name = target_cluster->get_back_cluster(); + auto* back_cluster = findCluster(back_cluster_name); + if (back_cluster) { + new_cluster->set_back_cluster(back_cluster_name); + back_cluster->set_front_cluster(new_cluster->get_name()); + } + target_cluster->set_back_cluster(new_cluster->get_name()); + + this->insertCluster(new_cluster->get_name(), new_cluster); + rollback_info.addition_clusters.push_back(*new_cluster); + } + rollback_info.addition_clusters.push_back(*target_cluster); + } + + _inst_belong_cluster[inst->get_index()] = nullptr; + _interval_remain_length[target_interval->get_index()] += inst_width; + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Split***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + bool Tetris::runRollback(bool clear_but_not_rollback) + { + if (clear_but_not_rollback) { + // clear. + std::stack().swap(_rollback_stack); + return true; + } + + while (!_rollback_stack.empty()) { + auto& rollback_info = _rollback_stack.top(); + + if (!rollback_info.is_dirty) { + _rollback_stack.pop(); + continue; + } + + std::map> interval_to_clusters; + for (auto& cluster : rollback_info.addition_clusters) { + ipl::LGInterval* target_interval = cluster.get_belong_interval(); + auto it = interval_to_clusters.find(target_interval); + if (it != interval_to_clusters.end()) { + it->second.push_back(cluster); + } + else { + interval_to_clusters.emplace(target_interval, std::vector{cluster}); + } + } + + for (auto pair : interval_to_clusters) { + auto* target_interval = pair.first; + this->deleteTargetIntervalClusters(target_interval, pair.second); + + // interval to reset remain length. + this->reCalIntervalRemainLength(target_interval); + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Rollback (delete) ***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + interval_to_clusters.clear(); + + // sort the origin_clusters + std::sort(rollback_info.origin_clusters.begin(), rollback_info.origin_clusters.end(), + [](const TetrisCluster& a, const TetrisCluster& b) { return a.get_min_x() < b.get_min_x(); }); + + for (auto& cluster : rollback_info.origin_clusters) { + ipl::LGInterval* target_interval = cluster.get_belong_interval(); + auto it = interval_to_clusters.find(target_interval); + if (it != interval_to_clusters.end()) { + it->second.push_back(cluster); + } + else { + interval_to_clusters.emplace(target_interval, std::vector{cluster}); + } + } + + for (auto pair : interval_to_clusters) { + auto* target_interval = pair.first; + this->insertTargetIntervalClusters(target_interval, pair.second); + + // interval to reset remain length. + this->reCalIntervalRemainLength(target_interval); + + // debug + // if (target_interval->get_name() == "30_1") { + // LOG_INFO << "***Rollback (insert) ***"; + // debugIntervalRemainLength(target_interval->get_name()); + // } + } + + _rollback_stack.pop(); + } + return true; + } + + void Tetris::deleteTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list) + { + int32_t interval_idx = interval->get_index(); + auto* interval_root = _interval_cluster_root[interval_idx]; + + TetrisCluster* prev_cluster = nullptr; + TetrisCluster* cur_cluster = interval_root; + TetrisCluster* back_cluster = nullptr; + + while (cur_cluster) { + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + std::string prev_cluster_name = cur_cluster->get_front_cluster(); + prev_cluster = this->findCluster(prev_cluster_name); + + bool changed_flag = false; + for (auto& target_cluster : cluster_list) { + if (cur_cluster->get_name() == target_cluster.get_name()) { + // change topo of cur_cluster + if (!prev_cluster && !back_cluster) { + _interval_cluster_root[interval_idx] = nullptr; + } + else if (prev_cluster && !back_cluster) { + prev_cluster->set_back_cluster(""); + } + else if (!prev_cluster && back_cluster) { + _interval_cluster_root[interval_idx] = back_cluster; + back_cluster->set_front_cluster(""); + } + else { + prev_cluster->set_back_cluster(back_cluster_name); + back_cluster->set_front_cluster(prev_cluster_name); + } + changed_flag = true; + this->deleteCluster(cur_cluster->get_name()); + break; + } + } + + if (changed_flag) { + changed_flag = false; + cur_cluster = back_cluster; + } + else { + cur_cluster = back_cluster; + } + } + } + + void Tetris::insertTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list) + { + std::vector> chain_list; + // cluster_list -> chain_list, chain is ordered outside. + int chain_idx = 0; + chain_list.push_back(std::vector{cluster_list[0]}); + for (size_t i = 0, j = i + 1; i < cluster_list.size(); i++, j++) { + if (j >= cluster_list.size()) { + // + break; + } + std::string back_name = cluster_list[i].get_back_cluster(); + if (back_name == cluster_list[j].get_name()) { + chain_list[chain_idx].push_back(cluster_list[j]); + } + else { + chain_list.push_back(std::vector{cluster_list[j]}); + chain_idx++; + } + } + + for (auto& chain : chain_list) { + std::vector cluster_chain; + for (auto& cluster : chain) { + TetrisCluster* c = new TetrisCluster(cluster.get_name()); + // need to set coordi + *c = cluster; + + // update inst coordi and change inst-cluster connection. + int32_t coordi_y = c->get_belong_interval()->get_belong_row()->get_coordinate().get_y(); + int32_t coordi_x = c->get_min_x(); + for (auto* inst : c->get_inst_list()) { + inst->updateCoordi(coordi_x, coordi_y); + coordi_x += inst->get_shape().get_width(); + _inst_belong_cluster[inst->get_index()] = c; + } + cluster_chain.push_back(c); + } + insertClusterChainIntoInterval(interval, cluster_chain); + } + } + + void Tetris::insertClusterChainIntoInterval(ipl::LGInterval* interval, std::vector& cluster_chain) + { + int32_t interval_idx = interval->get_index(); + auto* interval_root = _interval_cluster_root[interval_idx]; + + TetrisCluster* c_head = cluster_chain[0]; + TetrisCluster* c_tail = cluster_chain.back(); + + auto* cur_cluster = interval_root; + if (!cur_cluster) { + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + _interval_cluster_root[interval_idx] = c_head; + return; + } + + // front case + if (c_head->get_min_x() < cur_cluster->get_min_x()) { + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + _interval_cluster_root[interval_idx] = c_head; + cur_cluster->set_front_cluster(c_tail->get_name()); + return; + } + + while (cur_cluster) { + // not front case + std::string back_cluster_name = cur_cluster->get_back_cluster(); + auto* back_cluster = this->findCluster(back_cluster_name); + if (!back_cluster) { + // direct add chain list. + cur_cluster->set_back_cluster(c_head->get_name()); + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + break; + } + else { + if (c_head->get_min_x() >= cur_cluster->get_max_x() && c_head->get_max_x() <= back_cluster->get_min_x()) { + // insert chain list. + cur_cluster->set_back_cluster(c_head->get_name()); + back_cluster->set_front_cluster(c_tail->get_name()); + for (auto* c : cluster_chain) { + this->insertCluster(c->get_name(), c); + } + break; + } + cur_cluster = back_cluster; + } + } + return; + } + + void Tetris::reCalIntervalRemainLength(ipl::LGInterval* interval) + { + int32_t interval_idx = interval->get_index(); + int32_t remain_length = (interval->get_max_x() - interval->get_min_x()); + + TetrisCluster* interval_root = _interval_cluster_root[interval_idx]; + TetrisCluster* cur_cluster = interval_root; + TetrisCluster* back_cluster = nullptr; + while (cur_cluster) { + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + + int32_t cluster_width = cur_cluster->get_total_width(); + remain_length -= cluster_width; + cur_cluster = back_cluster; + } + _interval_remain_length[interval_idx] = remain_length; + } + + void Tetris::debugIntervalRemainLength(std::string interval_name) + { + auto* interval = _database->get_lg_layout()->find_interval(interval_name); + int32_t interval_idx = interval->get_index(); + int32_t remain_length = (interval->get_max_x() - interval->get_min_x()); + + TetrisCluster* interval_root = _interval_cluster_root[interval_idx]; + TetrisCluster* cur_cluster = interval_root; + TetrisCluster* back_cluster = nullptr; + + std::stringstream info; + info << interval_name << " --- "; + while (cur_cluster) { + info << cur_cluster->get_name() << "(" << cur_cluster->get_inst_list().size() << "," << cur_cluster->get_total_width() << ")" << " -> "; + + std::string back_cluster_name = cur_cluster->get_back_cluster(); + back_cluster = this->findCluster(back_cluster_name); + int32_t cluster_width = cur_cluster->get_total_width(); + remain_length -= cluster_width; + cur_cluster = back_cluster; + } + + info << std::endl; + info << "Expect remain_length: " << remain_length << " ; " << "Actual remain_length: " << _interval_remain_length[interval_idx] + << std::endl; + LOG_INFO << info.str(); + } + + std::string Tetris::obtainUniqueClusterName(std::string origin_name) + { + std::string unique_name = origin_name; + auto* cluster = this->findCluster(unique_name); + while (cluster) { + unique_name += "_2024"; + cluster = this->findCluster(unique_name); + } + return unique_name; + } + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.hh" new file mode 100644 index 0000000000000000000000000000000000000000..d2d73117b9f2797ac21d1a681dcf8e77d09ddfec --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/Tetris.hh" @@ -0,0 +1,109 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** + +#pragma once + +#include +#include +#include + +#include "TetrisCluster.hh" +#include "LGMethodInterface.hh" + +namespace ipl { +class LGInstance; +class LGInterval; +template +class Rectangle; +} // namespace ipl + +namespace ieda_solver { + + +struct RollbackInfo2 +{ + RollbackInfo2() : is_dirty(false) {} + ~RollbackInfo2() = default; + + bool is_dirty; + // for incremental legalization rollback + std::vector origin_clusters; + std::vector addition_clusters; +}; + + +class Tetris : public LGMethodInterface +{ + public: + Tetris() = default; + Tetris(const Tetris&) = delete; + Tetris(Tetris&&) = delete; + ~Tetris(); + + Tetris& operator=(const Tetris&) = delete; + Tetris& operator=(Tetris&&) = delete; + + void initDataRequirement(ipl::LGConfig* lg_config, ipl::LGDatabase* lg_database) override; + bool isInitialized() override; + void specifyTargetInstList(std::vector& target_inst_list) override; + bool runLegalization() override; + bool runIncrLegalization() override; + bool runRollback(bool clear_but_not_rollback) override; + + private: + std::unordered_map _cluster_map; + std::vector _inst_belong_cluster; + std::vector _interval_cluster_root; + std::vector _interval_remain_length; + + int32_t _row_height = -1; + int32_t _site_width = -1; + + std::stack _rollback_stack; + + void pickAndSortMovableInstList(std::vector& movable_inst_list); + int32_t placeRow(ipl::LGInstance* inst, int32_t row_idx, bool is_trial, bool is_record_cluster); + int32_t searchNearestIntervalIndex(std::vector& segment_list, ipl::Rectangle& inst_shape); + int32_t searchRemainSpaceSegIndex(std::vector& segment_list, ipl::Rectangle& inst_shape, int32_t origin_index); + TetrisCluster arrangeInstIntoIntervalCluster(ipl::LGInstance* inst, ipl::LGInterval* interval); + void replaceClusterInfo(TetrisCluster& cluster, bool is_record_cluster); + void arrangeClusterMinXCoordi(TetrisCluster& cluster); + void legalizeCluster(TetrisCluster& cluster); + void mergeWithPreviousCluster(TetrisCluster& cluster, TetrisCluster prev_cluster); + void mergeWithNextCluster(TetrisCluster& cluster, TetrisCluster next_cluster); + int32_t obtainFrontMaxX(TetrisCluster& cluster); + int32_t obtainBackMinX(TetrisCluster& cluster); + + int32_t calDistanceWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x); + bool checkOverlapWithBox(int32_t min_x, int32_t max_x, int32_t box_min_x, int32_t box_max_x); + + TetrisCluster* findCluster(std::string cluster_name); + void insertCluster(std::string name, TetrisCluster* cluster); + void deleteCluster(std::string name); + + void updateRemainLength(ipl::LGInterval* interval, int32_t delta); + void splitTargetInst(ipl::LGInstance* inst, RollbackInfo2& rollback_info); + void deleteTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list); + void insertTargetIntervalClusters(ipl::LGInterval* interval, std::vector& cluster_list); + void insertClusterChainIntoInterval(ipl::LGInterval* interval, std::vector& cluster_chain); + void reCalIntervalRemainLength(ipl::LGInterval* interval); + std::string obtainUniqueClusterName(std::string origin_name); + + void debugIntervalRemainLength(std::string interval_name); +}; + +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.cc" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.cc" new file mode 100644 index 0000000000000000000000000000000000000000..550debeb31e551d9e6784804ed23614dffbe6cd1 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.cc" @@ -0,0 +1,145 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** +#include "TetrisCluster.hh" + +#include + +#include "LGInstance.hh" +#include "LGInterval.hh" +#include "module/logger/Log.hh" + +namespace ieda_solver { + +TetrisCluster::TetrisCluster(std::string name) + : _name(name), + _belong_segment(nullptr), + _min_x(INT32_MAX), + _weight_e(0.0), + _weight_q(0.0), + _total_width(0), + _front_cluster(""), + _back_cluster("") +{ +} + +TetrisCluster::~TetrisCluster() +{ +} + +int32_t TetrisCluster::get_max_x() +{ + int32_t max_x = _min_x + _total_width; + return max_x; +} + +void TetrisCluster::clearTetrisInfo() +{ + _weight_e = 0.0; + _weight_q = 0.0; + _total_width = 0; +} + +void TetrisCluster::insertInstance(ipl::LGInstance* inst) +{ + int32_t inst_min_x = inst->get_coordi().get_x(); + + int32_t last_min_x = _min_x + _total_width - (*_inst_list.back()).get_shape().get_width(); + if (inst_min_x >= last_min_x) { + appendInst(inst); + _inst_list.push_back(inst); + return; + } + + clearTetrisInfo(); + int32_t front_min_x = _min_x; + int32_t front_max_x = front_min_x; + int32_t index = INT32_MIN; + bool flag_1 = (inst_min_x < front_min_x); + if (flag_1) { + appendInst(inst); + index = 0; + } + for (size_t i = 0; i < _inst_list.size(); i++) { + front_max_x += _inst_list[i]->get_shape().get_width(); + appendInst(_inst_list.at(i)); + bool flag_2 = (inst_min_x >= front_min_x && inst_min_x < front_max_x); + if (flag_2) { + index = i + 1; + appendInst(inst); + } + front_min_x = front_max_x; + } + if (index == INT32_MIN) { + std::cout << "Instance " << inst->get_name() << " cannot insert in the cluster" << std::endl; + return; + } + _inst_list.insert(std::next(_inst_list.begin(), index), inst); + return; +} + +void TetrisCluster::appendCluster(TetrisCluster& cluster) +{ + auto other_inst_list = cluster.get_inst_list(); + _inst_list.insert(_inst_list.end(), other_inst_list.begin(), other_inst_list.end()); + _weight_e += cluster.get_weight_e(); + _weight_q += (cluster.get_weight_q() - cluster.get_weight_e() * _total_width); + _total_width += cluster.get_total_width(); +} + +void TetrisCluster::appendInst(ipl::LGInstance* inst) +{ + _weight_e += inst->get_weight(); + _weight_q += inst->get_weight() * (inst->get_coordi().get_x() - _total_width); + _total_width += inst->get_shape().get_width(); +} + +void TetrisCluster::appendInstList(std::vector inst_list){ + for(auto* inst : inst_list){ + this->appendInst(inst); + } + _inst_list = inst_list; +} + +void TetrisCluster::updateTetrisInfo() +{ + clearTetrisInfo(); + for (size_t i = 0; i < _inst_list.size(); i++) { + appendInst(_inst_list[i]); + } +} + +int32_t TetrisCluster::obtainInstIdx(ipl::LGInstance* inst) +{ + int32_t inst_idx = -1; + for (size_t i = 0; i < _inst_list.size(); i++) { + if (inst == _inst_list[i]) { + inst_idx = i; + break; + } + } + return inst_idx; +} + +void TetrisCluster::eraseTargetInstByIdx(int32_t idx){ + _inst_list.erase(_inst_list.begin() + idx); +} + +void TetrisCluster::eraseTargetInstByIdxPair(int32_t begin_idx, int32_t end_idx){ + _inst_list.erase(_inst_list.begin()+begin_idx, _inst_list.begin() + end_idx + 1); +} + +} // namespace ieda_solver \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.hh" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.hh" new file mode 100644 index 0000000000000000000000000000000000000000..d92ec1808f652a76838b4309c39bb8c703267808 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/legalization/method/tetris/TetrisCluster.hh" @@ -0,0 +1,135 @@ +// *************************************************************************************** +// Copyright (c) 2023-2025 Peng Cheng Laboratory +// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences +// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip +// +// iEDA is licensed under Mulan PSL v2. +// You can use this software according to the terms and conditions of the Mulan PSL v2. +// You may obtain a copy of Mulan PSL v2 at: +// http://license.coscl.org.cn/MulanPSL2 +// +// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +// +// See the Mulan PSL v2 for more details. +// *************************************************************************************** +#pragma once + +#include +#include + +namespace ipl { +class LGInstance; +class LGInterval; +} // namespace ipl + +namespace ieda_solver { + +class TetrisCluster +{ + public: + TetrisCluster() = default; + explicit TetrisCluster(std::string name); + + TetrisCluster(const TetrisCluster& other) + { + _name = other._name; + _inst_list = other._inst_list; + _belong_segment = other._belong_segment; + _min_x = other._min_x; + _weight_e = other._weight_e; + _weight_q = other._weight_q; + _total_width = other._total_width; + _front_cluster = other._front_cluster; + _back_cluster = other._back_cluster; + } + TetrisCluster(TetrisCluster&& other) + { + _name = std::move(other._name); + _inst_list = std::move(other._inst_list); + _belong_segment = std::move(other._belong_segment); + _min_x = std::move(other._min_x); + _weight_e = std::move(other._weight_e); + _weight_q = std::move(other._weight_q); + _total_width = std::move(other._total_width); + _front_cluster = std::move(other._front_cluster); + _back_cluster = std::move(other._back_cluster); + } + ~TetrisCluster(); + + TetrisCluster& operator=(const TetrisCluster& other) + { + _name = other._name; + _inst_list = other._inst_list; + _belong_segment = other._belong_segment; + _min_x = other._min_x; + _weight_e = other._weight_e; + _weight_q = other._weight_q; + _total_width = other._total_width; + _front_cluster = other._front_cluster; + _back_cluster = other._back_cluster; + return (*this); + } + TetrisCluster& operator=(TetrisCluster&& other) + { + _name = std::move(other._name); + _inst_list = std::move(other._inst_list); + _belong_segment = std::move(other._belong_segment); + _min_x = std::move(other._min_x); + _weight_e = std::move(other._weight_e); + _weight_q = std::move(other._weight_q); + _total_width = std::move(other._total_width); + _front_cluster = std::move(other._front_cluster); + _back_cluster = std::move(other._back_cluster); + return (*this); + } + + // getter + std::string get_name() const { return _name; } + std::vector get_inst_list() const { return _inst_list; } + ipl::LGInterval* get_belong_interval() const { return _belong_segment; } + int32_t get_min_x() const { return _min_x; } + int32_t get_max_x(); + double get_weight_e() const { return _weight_e; } + double get_weight_q() const { return _weight_q; } + int32_t get_total_width() const { return _total_width; } + std::string get_front_cluster() const { return _front_cluster; } + std::string get_back_cluster() const { return _back_cluster; } + + // setter + void set_name(std::string name) { _name = name; } + void add_inst(ipl::LGInstance* inst) { _inst_list.push_back(inst); } + void set_belong_interval(ipl::LGInterval* seg) { _belong_segment = seg; } + void set_min_x(int32_t min_x) { _min_x = min_x; } + void set_front_cluster(std::string cluster) { _front_cluster = cluster; } + void set_back_cluster(std::string cluster) { + _back_cluster = cluster; + } + + + // function + void clearTetrisInfo(); + void updateTetrisInfo(); + void insertInstance(ipl::LGInstance* inst); + void appendCluster(TetrisCluster& cluster); + void appendInst(ipl::LGInstance* inst); + void appendInstList(std::vector inst_list); + int32_t obtainInstIdx(ipl::LGInstance* inst); + void eraseTargetInstByIdx(int32_t idx); + void eraseTargetInstByIdxPair(int32_t begin_idx, int32_t end_idx); + + private: + std::string _name; + std::vector _inst_list; + ipl::LGInterval* _belong_segment; + + int32_t _min_x; + double _weight_e; + double _weight_q; + int32_t _total_width; + + std::string _front_cluster; + std::string _back_cluster; +}; +} // namespace ieda_solver diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/\345\270\203\345\261\200\345\220\210\346\263\225\345\214\226\347\256\227\346\263\225\345\256\236\347\216\260.md" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/\345\270\203\345\261\200\345\220\210\346\263\225\345\214\226\347\256\227\346\263\225\345\256\236\347\216\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..1f34f73243f802dff12e79d61f158748fee65767 --- /dev/null +++ "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/Legalization/\345\270\203\345\261\200\345\220\210\346\263\225\345\214\226\347\256\227\346\263\225\345\256\236\347\216\260.md" @@ -0,0 +1,151 @@ +# 布局合法化算法实现 + +### 1. 问题简介 + +​ 布局流程中,可以分为三个阶段处理:总体布局(Global Placement)、合法化(Legalization)、详细布局(Detailed Placement)。在全局布局中把单元放到合适的位置,忽略单元重叠。合法化则是把单元放到行上,消除单元之间的重叠。 + +![全局布局、合法化、详细布局概述](images/1.png) + +### 2. Abacus算法 + +#### 2.1 Abacus算法的动态规划思想 + +**定义优化问题** + +![](images/3.png) + +**应用约束条件** + +![](images/4.png) + +**简化和转换问题** + +![](images/5.png) + +**计算最优位置** + +![](images/6.png) + +**动态规划的实现** + +![](images/7.png) + +![](images/8.png) + +#### 2.2 Abacus算法的伪代码 + +![Abacus算法伪代码](images/2.png) + +第1行:根据单元在全局放置中的 x 坐标对所有单元进行排序 + +第2行:遍历每个单元 `i` + +第3行:为单元 `i` 初始化最佳代价`Cbest` 为无限大 + +第4-10行:遍历每一行 `r` + +第5行:将单元 `i` 插入到行 `r` + +第6行:对行 `r` 执行 `PlaceRow` 函数,进行试探性放置 + +第7行:确定放置单元 `i` 后行 `r` 的总代价 `c` + +第8行:如果当前行的代价 `c` 小于之前的最佳代价 `Cbest`,则更新 `Cbest` 和最佳行 `rbest` + +第9行:从行 `r` 中移除单元 `i` + +第11行:将单元 `i` 放置到成本最低的行 `rbest` + +第12行:对行 `rbest` 进行最终的 `PlaceRow` 操作 + +第13行:结束对所有单元的遍历 + +#### 2.3 PlaceRow函数 + +​ 这段代码通过动态管理簇的创建、合并和单元的添加,优化每个单元在行中的位置,使得整体移动最小化。这种方法利用了簇的概念来高效地处理可能的重叠和位置调整,确保所有单元在法定位置上合理分布,从而达到最小的总移动距离。 + +![](images/9.png) + +#### 2.4 Abacus算法流程图 + +![](images/Abacus算法流程图.png) + +#### 2.5 iEDA中的Abacus算法实现 + +![](images/10.png) + +### 3. Tetris算法 + +#### 3.1 Tetris算法流程图 + +![](images/Tetris算法流程图.png) + +#### 3.2 Tetris算法实现 + +**根据元件的 x 坐标进行排序,对宽的元件赋予更高的权重** + +![](images/11.png) + +**Tetris算法** + +![](images/12.png) + +### 4. 实验结果 + +#### 4.1 Abacu布局合法化结果 + +实验在工艺sky130,设计gcd下进行。 + +全局布局结束后,半周长线长为:10268089 + +![](images/13.png) + +使用Abacus算法进行合法化,总移动量为:795709,运行时间为:0.014281s,半周长线长为:10438089 + +![](images/14.png) + +#### 4.2 Tetris布局合法化结果 + +实验在工艺sky130,设计gcd下进行。 + +全局布局结束后,半周长线长为:10268089 + +![](images/15.png) + +使用Tetris算法进行合法化,总移动量为:1473249,运行时间为:0.001208s,半周长线长为:10489260 + +![](images/16.png) + +#### 4.3 其他特征统计信息 + +| | Abacus | Tetris | 变化百分比 | +| :------------: | :-------: | :-------: | :--------: | +| 全局布局HPWL | 10268089 | 10268089 | 0 | +| 布局合法化HPWL | 10438089 | 10489260 | +0.49% | +| 详细布局HPWL | 9892338 | 9883234 | -0.09% | +| 总移动量 | 795709 | 1473249 | +85.15% | +| 运行时间 | 0.014341s | 0.001208s | -1087.17% | +| Total STWL | 10777178 | 10751546 | -0.24% | +| Max STWL | 209533 | 231449 | +10.46% | + +#### 4.4 在Tetris算法的排序中给宽度加入权重 + +​ Tetris算法的论文中,使用权重 width_factor,可以使得较宽的单元在进行详细放置排序时会被赋予更高的优先级。这样做的目的是在放置过程中优先处理宽的单元,确保在行或列中为这些大单元保留足够的空间,避免由于空间不足而无法合理放置。 + +![](images/17.png) + +​ 根据论文的介绍,如果利用率非常高(大于0.93),建议将 `width_factor` 设置为1.0;如果利用率较低(小于0.9),则可以将 `width_factor` 设置为较低的值,例如0.2。 + +![](images/18.png) + +​ 以下实验在工艺sky130,设计gcd下进行。 + +| | width_factor=0 | width_factor=0.2 | width_factor=0.5 | width_factor=1.0 | +| :------------: | :------------: | :--------------: | :--------------: | :--------------: | +| 全局布局HPWL | 10268089 | 10268089 | 10268089 | 10268089 | +| 布局合法化HPWL | 10489260 | 10489260 | 10490384 | 10522030 | +| 详细布局HPWL | 9883234 | 9883234 | 9884746 | 9883938 | +| 总移动量 | 1473249 | 1473249 | 1479503 | 1499905 | +| 运行时间 | 0.001208s | 0.00131s | 0.001227s | 0.001305s | +| Total STWL | 10751546 | 10751546 | 10837635 | 10932737 | +| Max STWL | 231449 | 231449 | 233369 | 233369 | \ No newline at end of file diff --git "a/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/\346\260\264\346\273\264\350\256\241\345\210\222\347\255\224\350\276\251-\350\213\217\345\235\232\350\215\243.pptx" "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/\346\260\264\346\273\264\350\256\241\345\210\222\347\255\224\350\276\251-\350\213\217\345\235\232\350\215\243.pptx" new file mode 100644 index 0000000000000000000000000000000000000000..919d9b72bba65b5e2b6f78b10ca8c10fcc0c3b5c Binary files /dev/null and "b/EDA/codes/2024-07/\350\213\217\345\235\232\350\215\243/\346\260\264\346\273\264\350\256\241\345\210\222\347\255\224\350\276\251-\350\213\217\345\235\232\350\215\243.pptx" differ