diff --git a/CMakeFiles/3.28.3/CMakeCCompiler.cmake b/CMakeFiles/3.28.3/CMakeCCompiler.cmake new file mode 100755 index 0000000..d1c4fa3 --- /dev/null +++ b/CMakeFiles/3.28.3/CMakeCCompiler.cmake @@ -0,0 +1,74 @@ +set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "AppleClang") +set(CMAKE_C_COMPILER_VERSION "13.1.6.13160021") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "c_std_23") + +set(CMAKE_C_PLATFORM_ID "Darwin") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar") +set(CMAKE_C_COMPILER_AR "") +set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "") +set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_TAPI "/Library/Developer/CommandLineTools/usr/bin/tapi") +set(CMAKE_COMPILER_IS_GNUCC ) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) +set(CMAKE_C_LINKER_DEPFILE_SUPPORTED FALSE) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks") diff --git a/CMakeFiles/3.28.3/CMakeCXXCompiler.cmake b/CMakeFiles/3.28.3/CMakeCXXCompiler.cmake new file mode 100755 index 0000000..cbb10cf --- /dev/null +++ b/CMakeFiles/3.28.3/CMakeCXXCompiler.cmake @@ -0,0 +1,85 @@ +set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "AppleClang") +set(CMAKE_CXX_COMPILER_VERSION "13.1.6.13160021") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON") +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 "Darwin") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar") +set(CMAKE_CXX_COMPILER_AR "") +set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "") +set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_TAPI "/Library/Developer/CommandLineTools/usr/bin/tapi") +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;ccm;cxxm;c++m) +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) +set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED FALSE) + +# 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 "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks") diff --git a/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_C.bin b/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000..ada9d66 Binary files /dev/null and b/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_C.bin differ diff --git a/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_CXX.bin b/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..8661dc8 Binary files /dev/null and b/CMakeFiles/3.28.3/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/CMakeFiles/3.28.3/CMakeSystem.cmake b/CMakeFiles/3.28.3/CMakeSystem.cmake new file mode 100755 index 0000000..aac8e7a --- /dev/null +++ b/CMakeFiles/3.28.3/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Darwin-21.3.0") +set(CMAKE_HOST_SYSTEM_NAME "Darwin") +set(CMAKE_HOST_SYSTEM_VERSION "21.3.0") +set(CMAKE_HOST_SYSTEM_PROCESSOR "arm64") + + + +set(CMAKE_SYSTEM "Darwin-21.3.0") +set(CMAKE_SYSTEM_NAME "Darwin") +set(CMAKE_SYSTEM_VERSION "21.3.0") +set(CMAKE_SYSTEM_PROCESSOR "arm64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.c b/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..0a0ec9b --- /dev/null +++ b/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,880 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#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(__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_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#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(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 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(__clang__) && defined(__cray__) +# define COMPILER_ID "CrayClang" +# define COMPILER_VERSION_MAJOR DEC(__cray_major__) +# define COMPILER_VERSION_MINOR DEC(__cray_minor__) +# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#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(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__ORANGEC__) +# define COMPILER_ID "OrangeC" +# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__) + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#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/100 % 100) +# 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(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# 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(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 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 + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# 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 + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#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 + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# 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(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[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; +} +#endif diff --git a/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.o b/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.o new file mode 100644 index 0000000..537fbf2 Binary files /dev/null and b/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.o differ diff --git a/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.cpp b/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..9c9c90e --- /dev/null +++ b/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,869 @@ +/* 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(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#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(__clang__) && defined(__cray__) +# define COMPILER_ID "CrayClang" +# define COMPILER_VERSION_MAJOR DEC(__cray_major__) +# define COMPILER_VERSION_MINOR DEC(__cray_minor__) +# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#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(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__ORANGEC__) +# define COMPILER_ID "OrangeC" +# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__) + +#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/100 % 100) +# 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(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# 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(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 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 + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#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 + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# 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[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[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/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.o b/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.o new file mode 100644 index 0000000..aacee10 Binary files /dev/null and b/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.o differ diff --git a/CMakeFiles/CMakeConfigureLog.yaml b/CMakeFiles/CMakeConfigureLog.yaml new file mode 100644 index 0000000..9b4d444 --- /dev/null +++ b/CMakeFiles/CMakeConfigureLog.yaml @@ -0,0 +1,419 @@ + +--- +events: + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:233 (message)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + The system is: Darwin - 21.3.0 - arm64 + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. + Compiler: /Library/Developer/CommandLineTools/usr/bin/cc + Build flags: + Id flags: + + The output was: + 1 + ld: library not found for -lSystem + clang: error: linker command failed with exit code 1 (use -v to see invocation) + + + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. + Compiler: /Library/Developer/CommandLineTools/usr/bin/cc + Build flags: + Id flags: -c + + The output was: + 0 + + + Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o" + + The C compiler identification is AppleClang, found in: + /Users/male/git/gribjump/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.o + + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. + Compiler: /Library/Developer/CommandLineTools/usr/bin/c++ + Build flags: + Id flags: + + The output was: + 1 + ld: library not found for -lc++ + clang: error: linker command failed with exit code 1 (use -v to see invocation) + + + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. + Compiler: /Library/Developer/CommandLineTools/usr/bin/c++ + Build flags: + Id flags: -c + + The output was: + 0 + + + Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o" + + The CXX compiler identification is AppleClang, found in: + /Users/male/git/gribjump/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.o + + - + kind: "try_compile-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + checks: + - "Detecting C compiler ABI info" + directories: + source: "/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ" + binary: "/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ" + cmakeVariables: + CMAKE_C_FLAGS: "" + CMAKE_C_FLAGS_DEBUG: "-g" + CMAKE_EXE_LINKER_FLAGS: "" + CMAKE_MODULE_PATH: "/Users/male/git/gribjump/cmake;/Users/male/git/ecbuild/cmake" + CMAKE_OSX_ARCHITECTURES: "" + CMAKE_OSX_DEPLOYMENT_TARGET: "12.2" + CMAKE_OSX_SYSROOT: "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk" + CMAKE_WARN_DEPRECATED: "ON" + buildResult: + variable: "CMAKE_C_ABI_COMPILED" + cached: true + stdout: | + Change Dir: '/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ' + + Run Build Command(s): /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_e0c2a/fast + /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_e0c2a.dir/build.make CMakeFiles/cmTC_e0c2a.dir/build + Building C object CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o + /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -v -Wl,-v -MD -MT CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c + Apple clang version 13.1.6 (clang-1316.0.21.2.5) + Target: arm64-apple-darwin21.3.0 + Thread model: posix + InstalledDir: /Library/Developer/CommandLineTools/usr/bin + clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument] + "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx12.2.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +dotprod -target-feature +fp16fml -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdebug-compilation-dir=/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -x c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c + clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target arm64-apple-darwin21.3.0 + ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include" + ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks" + #include "..." search starts here: + #include <...> search starts here: + /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include + /Library/Developer/CommandLineTools/usr/include + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory) + End of search list. + Linking C executable cmTC_e0c2a + /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0c2a.dir/link.txt --verbose=1 + /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -v -Wl,-v CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -o cmTC_e0c2a + Apple clang version 13.1.6 (clang-1316.0.21.2.5) + Target: arm64-apple-darwin21.3.0 + Thread model: posix + InstalledDir: /Library/Developer/CommandLineTools/usr/bin + "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 12.2.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_e0c2a -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a + @(#)PROGRAM:ld PROJECT:ld64-764 + BUILD 11:22:55 Apr 28 2022 + configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em + Library search paths: + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib + Framework search paths: + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/ + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Parsed C implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + add: [/Library/Developer/CommandLineTools/usr/include] + end of search list found + collapse include dir [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] ==> [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + collapse include dir [/Library/Developer/CommandLineTools/usr/include] ==> [/Library/Developer/CommandLineTools/usr/include] + implicit include dirs: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include] + + + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:159 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Parsed C implicit link information: + link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: '/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ'] + ignore line: [] + ignore line: [Run Build Command(s): /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_e0c2a/fast] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_e0c2a.dir/build.make CMakeFiles/cmTC_e0c2a.dir/build] + ignore line: [Building C object CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -v -Wl -v -MD -MT CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c] + ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)] + ignore line: [Target: arm64-apple-darwin21.3.0] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin] + ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]] + ignore line: [ "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx12.2.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +dotprod -target-feature +fp16fml -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdebug-compilation-dir=/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-NNPUfQ -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -x c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCCompilerABI.c] + ignore line: [clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target arm64-apple-darwin21.3.0] + ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"] + ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + ignore line: [ /Library/Developer/CommandLineTools/usr/include] + ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)] + ignore line: [End of search list.] + ignore line: [Linking C executable cmTC_e0c2a] + ignore line: [/opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0c2a.dir/link.txt --verbose=1] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -Wl -search_paths_first -Wl -headerpad_max_install_names -v -Wl -v CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -o cmTC_e0c2a ] + ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)] + ignore line: [Target: arm64-apple-darwin21.3.0] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin] + link line: [ "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 12.2.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_e0c2a -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + arg [/Library/Developer/CommandLineTools/usr/bin/ld] ==> ignore + arg [-demangle] ==> ignore + arg [-lto_library] ==> ignore, skip following value + arg [/Library/Developer/CommandLineTools/usr/lib/libLTO.dylib] ==> skip value of -lto_library + arg [-dynamic] ==> ignore + arg [-arch] ==> ignore + arg [arm64] ==> ignore + arg [-platform_version] ==> ignore + arg [macos] ==> ignore + arg [12.2.0] ==> ignore + arg [12.3] ==> ignore + arg [-syslibroot] ==> ignore + arg [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk] ==> ignore + arg [-o] ==> ignore + arg [cmTC_e0c2a] ==> ignore + arg [-search_paths_first] ==> ignore + arg [-headerpad_max_install_names] ==> ignore + arg [-v] ==> ignore + arg [CMakeFiles/cmTC_e0c2a.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lSystem] ==> lib [System] + arg [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] ==> lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + Library search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + Framework search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] + remove lib [System] + remove lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + collapse library dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + collapse framework dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks] + implicit libs: [] + implicit objs: [] + implicit dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + implicit fwks: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks] + + + - + kind: "try_compile-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + checks: + - "Detecting CXX compiler ABI info" + directories: + source: "/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC" + binary: "/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC" + cmakeVariables: + CMAKE_CXX_FLAGS: "" + CMAKE_CXX_FLAGS_DEBUG: "-g" + CMAKE_EXE_LINKER_FLAGS: "" + CMAKE_MODULE_PATH: "/Users/male/git/gribjump/cmake;/Users/male/git/ecbuild/cmake" + CMAKE_OSX_ARCHITECTURES: "" + CMAKE_OSX_DEPLOYMENT_TARGET: "12.2" + CMAKE_OSX_SYSROOT: "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk" + CMAKE_WARN_DEPRECATED: "ON" + buildResult: + variable: "CMAKE_CXX_ABI_COMPILED" + cached: true + stdout: | + Change Dir: '/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC' + + Run Build Command(s): /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_edf82/fast + /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_edf82.dir/build.make CMakeFiles/cmTC_edf82.dir/build + Building CXX object CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o + /Library/Developer/CommandLineTools/usr/bin/c++ -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -v -Wl,-v -MD -MT CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp + Apple clang version 13.1.6 (clang-1316.0.21.2.5) + Target: arm64-apple-darwin21.3.0 + Thread model: posix + InstalledDir: /Library/Developer/CommandLineTools/usr/bin + clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument] + "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx12.2.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +dotprod -target-feature +fp16fml -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdeprecated-macro -fdebug-compilation-dir=/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -x c++ /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp + clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target arm64-apple-darwin21.3.0 + ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include" + ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks" + #include "..." search starts here: + #include <...> search starts here: + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1 + /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include + /Library/Developer/CommandLineTools/usr/include + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory) + End of search list. + Linking CXX executable cmTC_edf82 + /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_edf82.dir/link.txt --verbose=1 + /Library/Developer/CommandLineTools/usr/bin/c++ -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -v -Wl,-v CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_edf82 + Apple clang version 13.1.6 (clang-1316.0.21.2.5) + Target: arm64-apple-darwin21.3.0 + Thread model: posix + InstalledDir: /Library/Developer/CommandLineTools/usr/bin + "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 12.2.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_edf82 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a + @(#)PROGRAM:ld PROJECT:ld64-764 + BUILD 11:22:55 Apr 28 2022 + configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em + Library search paths: + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib + Framework search paths: + /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/ + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Parsed CXX implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1] + add: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + add: [/Library/Developer/CommandLineTools/usr/include] + end of search list found + collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1] + collapse include dir [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] ==> [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + collapse include dir [/Library/Developer/CommandLineTools/usr/include] ==> [/Library/Developer/CommandLineTools/usr/include] + implicit include dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include] + + + - + kind: "message-v1" + backtrace: + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:159 (message)" + - "/opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "/Users/male/git/ecbuild/cmake/ecbuild_project.cmake:68 (_project)" + - "CMakeLists.txt:5 (project)" + message: | + Parsed CXX implicit link information: + link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: '/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC'] + ignore line: [] + ignore line: [Run Build Command(s): /opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_edf82/fast] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_edf82.dir/build.make CMakeFiles/cmTC_edf82.dir/build] + ignore line: [Building CXX object CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/c++ -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -v -Wl -v -MD -MT CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -c /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)] + ignore line: [Target: arm64-apple-darwin21.3.0] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin] + ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]] + ignore line: [ "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx12.2.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +dotprod -target-feature +fp16fml -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdeprecated-macro -fdebug-compilation-dir=/Users/male/git/gribjump/CMakeFiles/CMakeScratch/TryCompile-5yNUZC -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -x c++ /opt/homebrew/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target arm64-apple-darwin21.3.0] + ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"] + ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1] + ignore line: [ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] + ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] + ignore line: [ /Library/Developer/CommandLineTools/usr/include] + ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)] + ignore line: [End of search list.] + ignore line: [Linking CXX executable cmTC_edf82] + ignore line: [/opt/homebrew/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_edf82.dir/link.txt --verbose=1] + ignore line: [/Library/Developer/CommandLineTools/usr/bin/c++ -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -Wl -search_paths_first -Wl -headerpad_max_install_names -v -Wl -v CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_edf82 ] + ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)] + ignore line: [Target: arm64-apple-darwin21.3.0] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin] + link line: [ "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 12.2.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_edf82 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + arg [/Library/Developer/CommandLineTools/usr/bin/ld] ==> ignore + arg [-demangle] ==> ignore + arg [-lto_library] ==> ignore, skip following value + arg [/Library/Developer/CommandLineTools/usr/lib/libLTO.dylib] ==> skip value of -lto_library + arg [-dynamic] ==> ignore + arg [-arch] ==> ignore + arg [arm64] ==> ignore + arg [-platform_version] ==> ignore + arg [macos] ==> ignore + arg [12.2.0] ==> ignore + arg [12.3] ==> ignore + arg [-syslibroot] ==> ignore + arg [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk] ==> ignore + arg [-o] ==> ignore + arg [cmTC_edf82] ==> ignore + arg [-search_paths_first] ==> ignore + arg [-headerpad_max_install_names] ==> ignore + arg [-v] ==> ignore + arg [CMakeFiles/cmTC_edf82.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lc++] ==> lib [c++] + arg [-lSystem] ==> lib [System] + arg [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] ==> lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + Library search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + Framework search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] + remove lib [System] + remove lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] + collapse library dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + collapse framework dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks] + implicit libs: [c++] + implicit objs: [] + implicit dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] + implicit fwks: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks] + + +... diff --git a/CMakeFiles/cmake.check_cache b/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b0039d..98912a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ set( PERSISTENT_NAMESPACE "eckit" CACHE INTERNAL "" ) # needed for generating .b ecbuild_find_package( NAME eckit VERSION 1.25.2 REQUIRED ) ecbuild_find_package( NAME metkit VERSION 1.5 REQUIRED ) +# ecbuild_find_package( NAME Protobuf REQUIRED) # Set "GRIBJUMP_LOCAL_EXTRACT" to build everything. If it is off, build only minimal clientside functionality. ecbuild_add_option( FEATURE GRIBJUMP_LOCAL_EXTRACT @@ -28,6 +29,7 @@ if (HAVE_GRIBJUMP_LOCAL_EXTRACT) ecbuild_find_package( NAME fdb5 VERSION 5.11.28 REQUIRED ) ecbuild_find_package( NAME eccodes VERSION 2.32.1 REQUIRED ) ecbuild_find_package( NAME AEC VERSION 1.1.1 REQUIRED ) # todo make optional? + # ecbuild_find_package( NAME Protobuf REQUIRED) endif() diff --git a/pygribjump.egg-info/PKG-INFO b/pygribjump.egg-info/PKG-INFO new file mode 100644 index 0000000..614ac46 --- /dev/null +++ b/pygribjump.egg-info/PKG-INFO @@ -0,0 +1,7 @@ +Metadata-Version: 2.1 +Name: pygribjump +Version: 0.0.1 +Summary: Python interface to GribJump +Home-page: https://github.com/ecmwf/gribjump +Author: ECMWF +Author-email: software.support@ecmwf.int diff --git a/pygribjump.egg-info/SOURCES.txt b/pygribjump.egg-info/SOURCES.txt new file mode 100644 index 0000000..81fa589 --- /dev/null +++ b/pygribjump.egg-info/SOURCES.txt @@ -0,0 +1,14 @@ +MANIFEST.in +README.md +setup.py +pygribjump/__init__.py +pygribjump/gribjump_c.h +pygribjump/pygribjump.py +pygribjump/test.py +pygribjump/version.py +pygribjump.egg-info/PKG-INFO +pygribjump.egg-info/SOURCES.txt +pygribjump.egg-info/dependency_links.txt +pygribjump.egg-info/not-zip-safe +pygribjump.egg-info/requires.txt +pygribjump.egg-info/top_level.txt \ No newline at end of file diff --git a/pygribjump.egg-info/dependency_links.txt b/pygribjump.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pygribjump.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/pygribjump.egg-info/not-zip-safe b/pygribjump.egg-info/not-zip-safe new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pygribjump.egg-info/not-zip-safe @@ -0,0 +1 @@ + diff --git a/pygribjump.egg-info/requires.txt b/pygribjump.egg-info/requires.txt new file mode 100644 index 0000000..5e8e17b --- /dev/null +++ b/pygribjump.egg-info/requires.txt @@ -0,0 +1,2 @@ +cffi +findlibs diff --git a/pygribjump.egg-info/top_level.txt b/pygribjump.egg-info/top_level.txt new file mode 100644 index 0000000..b190cc5 --- /dev/null +++ b/pygribjump.egg-info/top_level.txt @@ -0,0 +1 @@ +pygribjump diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37ae7f4..1e4e34a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,3 +6,7 @@ ecbuild_find_project_files() add_subdirectory( gribjump ) add_subdirectory( tools ) + +# find_package(Protobuf REQUIRED) +# include_directories(${protobuf_INCLUDE_DIR}) + diff --git a/src/gribjump/CMakeLists.txt b/src/gribjump/CMakeLists.txt index e68028f..b188ab2 100644 --- a/src/gribjump/CMakeLists.txt +++ b/src/gribjump/CMakeLists.txt @@ -9,6 +9,12 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gribjump_config.h DESTINATION ${INSTALL_INCLUDE_DIR}/gribjump ) # gribjump library +find_package(Protobuf REQUIRED) +include_directories(${protobuf_INCLUDE_DIR}) +include_directories(${Protobuf_INCLUDE_DIRS}) +# include_directories(${ProtobufIncludePath}) +protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS tools/index_tree.proto) +# target_link_libraries(gribjump ${Protobuf_LIBRARIES}) list( APPEND gribjump_srcs ${CMAKE_CURRENT_BINARY_DIR}/gribjump_version.c @@ -31,7 +37,16 @@ list( APPEND gribjump_srcs tools/ToolUtils.h tools/ToolUtils.cc - + + tools/CompressedRequestTree.h + tools/CompressedRequestTree.cc + + tools/index_tree.pb.h + tools/index_tree.pb.cc + + tools/TreeEncodings.h + tools/TreeEncodings.cc + remote/RemoteGribJump.cc remote/RemoteGribJump.h @@ -63,6 +78,14 @@ if( HAVE_GRIBJUMP_LOCAL_EXTRACT ) tools/EccodesExtract.h tools/EccodesExtract.cc + tools/CompressedRequestTree.h + tools/CompressedRequestTree.cc + + tools/index_tree.pb.h + tools/index_tree.pb.cc + + tools/TreeEncodings.h + tools/TreeEncodings.cc remote/Request.h remote/Request.cc @@ -120,5 +143,6 @@ ecbuild_add_library( metkit eckit eckit_option + ${Protobuf_LIBRARIES} ${SERVER_LIBS} ) diff --git a/src/gribjump/ExtractionData.cc b/src/gribjump/ExtractionData.cc index cce72e8..1e61700 100644 --- a/src/gribjump/ExtractionData.cc +++ b/src/gribjump/ExtractionData.cc @@ -13,144 +13,171 @@ #include "gribjump/ExtractionData.h" #include "eckit/value/Value.h" -namespace gribjump { - -ExtractionResult::ExtractionResult(){} - -ExtractionResult::ExtractionResult(std::vector> values, std::vector>> mask): - values_(std::move(values)), - mask_(std::move(mask)) - {} - -ExtractionResult::ExtractionResult(eckit::Stream& s){ - s >> values_; - std::vector> bitsetStrings; - s >> bitsetStrings; - for (auto& v : bitsetStrings) { - std::vector> bitset; - for (auto& b : v) { - bitset.push_back(std::bitset<64>(b)); - } - mask_.push_back(bitset); +namespace gribjump +{ + + ExtractionResult::ExtractionResult() {} + + ExtractionResult::ExtractionResult(std::vector> values, std::vector>> mask) : values_(std::move(values)), + mask_(std::move(mask)) + { } -} - -void ExtractionResult::values_ptr(double*** values, unsigned long* nrange, unsigned long** nvalues) { - *nrange = values_.size(); - *values = new double*[*nrange]; - *nvalues = new unsigned long[*nrange]; - for (size_t i = 0; i < *nrange; i++) { - (*nvalues)[i] = values_[i].size(); - (*values)[i] = values_[i].data(); + + ExtractionResult::ExtractionResult(eckit::Stream &s) + { + s >> values_; + std::vector> bitsetStrings; + s >> bitsetStrings; + for (auto &v : bitsetStrings) + { + std::vector> bitset; + for (auto &b : v) + { + bitset.push_back(std::bitset<64>(b)); + } + mask_.push_back(bitset); + } } -} - -void ExtractionResult::encode(eckit::Stream& s) const { - s << values_; - std::vector> bitsetStrings; - for (auto& v : mask_) { - std::vector bitsetString; - for (auto& b : v) { - bitsetString.push_back(b.to_string()); + + void ExtractionResult::values_ptr(double ***values, unsigned long *nrange, unsigned long **nvalues) + { + *nrange = values_.size(); + *values = new double *[*nrange]; + *nvalues = new unsigned long[*nrange]; + for (size_t i = 0; i < *nrange; i++) + { + (*nvalues)[i] = values_[i].size(); + (*values)[i] = values_[i].data(); } - bitsetStrings.push_back(bitsetString); } - s << bitsetStrings; -} -void ExtractionResult::print(std::ostream& s) const { - s << "ExtractionResult[Values:["; - for (auto& v : values_) { - s << v << ", "; + void ExtractionResult::encode(eckit::Stream &s) const + { + s << values_; + std::vector> bitsetStrings; + for (auto &v : mask_) + { + std::vector bitsetString; + for (auto &b : v) + { + bitsetString.push_back(b.to_string()); + } + bitsetStrings.push_back(bitsetString); + } + s << bitsetStrings; } - s << "]; Masks:["; - for (auto& v : mask_) { - s << "["; - for (auto& b : v) { - s << std::hex << b.to_ullong() << std::dec << ", "; + + void ExtractionResult::print(std::ostream &s) const + { + s << "ExtractionResult[Values:["; + for (auto &v : values_) + { + s << v << ", "; + } + s << "]; Masks:["; + for (auto &v : mask_) + { + s << "["; + for (auto &b : v) + { + s << std::hex << b.to_ullong() << std::dec << ", "; + } + s << "], "; } - s << "], "; + s << "]" << std::endl; + } + + std::ostream &operator<<(std::ostream &s, const ExtractionResult &o) + { + o.print(s); + return s; + } + + eckit::Stream &operator<<(eckit::Stream &s, const ExtractionResult &o) + { + o.encode(s); + return s; } - s << "]" << std::endl; -} - -std::ostream& operator<<(std::ostream& s, const ExtractionResult& o) { - o.print(s); - return s; -} - -eckit::Stream& operator<<(eckit::Stream& s, const ExtractionResult& o) { - o.encode(s); - return s; -} - -//--------------------------------------------------------------------------------------------------------------------- - -ExtractionRequest::ExtractionRequest(metkit::mars::MarsRequest request, std::vector ranges): - ranges_(std::move(ranges)), - request_(std::move(request)) - {} -ExtractionRequest::ExtractionRequest(){} - -ExtractionRequest::ExtractionRequest(eckit::Stream& s){ - request_ = metkit::mars::MarsRequest(s); - size_t numRanges; - s >> numRanges; - for (size_t j = 0; j < numRanges; j++) { - size_t start, end; - s >> start >> end; - ranges_.push_back(std::make_pair(start, end)); + + //--------------------------------------------------------------------------------------------------------------------- + + ExtractionRequest::ExtractionRequest(metkit::mars::MarsRequest request, std::vector ranges) : ranges_(std::move(ranges)), + request_(std::move(request)) + { + } + ExtractionRequest::ExtractionRequest() {} + + ExtractionRequest::ExtractionRequest(eckit::Stream &s) + { + request_ = metkit::mars::MarsRequest(s); + size_t numRanges; + s >> numRanges; + for (size_t j = 0; j < numRanges; j++) + { + size_t start, end; + s >> start >> end; + ranges_.push_back(std::make_pair(start, end)); + } } -} -std::vector ExtractionRequest::split(const std::string& key) const { + std::vector ExtractionRequest::split(const std::string &key) const + { - std::vector reqs = request_.split(key); + std::vector reqs = request_.split(key); - std::vector requests; - requests.reserve(reqs.size()); - for (auto& r : reqs) { - requests.push_back(ExtractionRequest(r, ranges_)); + std::vector requests; + requests.reserve(reqs.size()); + for (auto &r : reqs) + { + requests.push_back(ExtractionRequest(r, ranges_)); + } + return requests; } - return requests; -} -std::vector ExtractionRequest::split(const std::vector& keys) const { - - std::vector reqs = request_.split(keys); + std::vector ExtractionRequest::split(const std::vector &keys) const + { + + std::vector reqs = request_.split(keys); - std::vector requests; - requests.reserve(reqs.size()); - for (auto& r : reqs) { - requests.push_back(ExtractionRequest(r, ranges_)); + std::vector requests; + requests.reserve(reqs.size()); + for (auto &r : reqs) + { + requests.push_back(ExtractionRequest(r, ranges_)); + } + return requests; } - return requests; -} - -eckit::Stream& operator<<(eckit::Stream& s, const ExtractionRequest& o) { - o.encode(s); - return s; -} - -void ExtractionRequest::encode(eckit::Stream& s) const { - s << request_; - s << ranges_.size(); - for (auto& [start, end] : ranges_) { - s << start << end; + + eckit::Stream &operator<<(eckit::Stream &s, const ExtractionRequest &o) + { + o.encode(s); + return s; + } + + void ExtractionRequest::encode(eckit::Stream &s) const + { + s << request_; + s << ranges_.size(); + for (auto &[start, end] : ranges_) + { + s << start << end; + } } -} -void ExtractionRequest::print(std::ostream& s) const { - s << "ExtractionRequest[Request: " << request_ << "; Ranges: "; - for (auto& [start, end] : ranges_) { - s << "(" << start << ", " << end << "), "; + void ExtractionRequest::print(std::ostream &s) const + { + s << "ExtractionRequest[Request: " << request_ << "; Ranges: "; + for (auto &[start, end] : ranges_) + { + s << "(" << start << ", " << end << "), "; + } + s << "]"; } - s << "]"; -} -std::ostream& operator<<(std::ostream& s, const ExtractionRequest& o) { - o.print(s); - return s; -} + std::ostream &operator<<(std::ostream &s, const ExtractionRequest &o) + { + o.print(s); + return s; + } } // namespace gribjump diff --git a/src/gribjump/ExtractionData.h b/src/gribjump/ExtractionData.h index 2c95412..f1eeb45 100644 --- a/src/gribjump/ExtractionData.h +++ b/src/gribjump/ExtractionData.h @@ -21,72 +21,74 @@ using Range = std::pair; -namespace gribjump { - -//---------------------------------------------------------------------------------------------------------------------- - -class ExtractionResult { -public: // methods - - ExtractionResult(); - ExtractionResult(std::vector> values, std::vector>> mask); - explicit ExtractionResult(eckit::Stream& s); - - const std::vector>& values() const {return values_;} - const std::vector>>& mask() const {return mask_;} - - size_t nrange() const {return values_.size();} - size_t nvalues(size_t i) const {return values_[i].size();} - size_t total_values() const { - size_t total = 0; - for (auto& v : values_) { - total += v.size(); +namespace gribjump +{ + + //---------------------------------------------------------------------------------------------------------------------- + + class ExtractionResult + { + public: // methods + ExtractionResult(); + ExtractionResult(std::vector> values, std::vector>> mask); + explicit ExtractionResult(eckit::Stream &s); + + const std::vector> &values() const { return values_; } + const std::vector>> &mask() const { return mask_; } + + size_t nrange() const { return values_.size(); } + size_t nvalues(size_t i) const { return values_[i].size(); } + size_t total_values() const + { + size_t total = 0; + for (auto &v : values_) + { + total += v.size(); + } + return total; } - return total; - } - - // For exposing buffers to C - // Use carefully, as the vector values_ still owns the data. - void values_ptr(double*** values, unsigned long* nrange, unsigned long** nvalues); - -private: // methods - void encode(eckit::Stream& s) const; - void print(std::ostream&) const; - friend eckit::Stream& operator<<(eckit::Stream& s, const ExtractionResult& o); - friend std::ostream& operator<<(std::ostream& s, const ExtractionResult& r); + // For exposing buffers to C + // Use carefully, as the vector values_ still owns the data. + void values_ptr(double ***values, unsigned long *nrange, unsigned long **nvalues); -private: // members - std::vector> values_; - std::vector>> mask_; -}; + private: // methods + void encode(eckit::Stream &s) const; + void print(std::ostream &) const; + friend eckit::Stream &operator<<(eckit::Stream &s, const ExtractionResult &o); + friend std::ostream &operator<<(std::ostream &s, const ExtractionResult &r); -//---------------------------------------------------------------------------------------------------------------------- + private: // members + std::vector> values_; + std::vector>> mask_; + }; -class ExtractionRequest { + //---------------------------------------------------------------------------------------------------------------------- -public: // methods + class ExtractionRequest + { - ExtractionRequest(); - ExtractionRequest(metkit::mars::MarsRequest, std::vector); - explicit ExtractionRequest(eckit::Stream& s); + public: // methods + ExtractionRequest(); + ExtractionRequest(metkit::mars::MarsRequest, std::vector); + explicit ExtractionRequest(eckit::Stream &s); - std::vector split(const std::vector& keys) const; - std::vector split(const std::string& key) const; - const std::vector& getRanges() const {return ranges_;} - const metkit::mars::MarsRequest& getRequest() const {return request_;} + std::vector split(const std::vector &keys) const; + std::vector split(const std::string &key) const; + const std::vector &getRanges() const { return ranges_; } + const metkit::mars::MarsRequest &getRequest() const { return request_; } -private: // methods - void print(std::ostream&) const; - void encode(eckit::Stream& s) const; - friend eckit::Stream& operator<<(eckit::Stream& s, const ExtractionRequest& o); - friend std::ostream& operator<<(std::ostream& s, const ExtractionRequest& r); + private: // methods + void print(std::ostream &) const; + void encode(eckit::Stream &s) const; + friend eckit::Stream &operator<<(eckit::Stream &s, const ExtractionRequest &o); + friend std::ostream &operator<<(std::ostream &s, const ExtractionRequest &r); -private: // members - std::vector ranges_; - metkit::mars::MarsRequest request_; -}; + private: // members + std::vector ranges_; + metkit::mars::MarsRequest request_; + }; -//---------------------------------------------------------------------------------------------------------------------- + //---------------------------------------------------------------------------------------------------------------------- } // namespace gribjump diff --git a/src/gribjump/FDBService.cc b/src/gribjump/FDBService.cc index 3d3c7ff..8312738 100644 --- a/src/gribjump/FDBService.cc +++ b/src/gribjump/FDBService.cc @@ -18,125 +18,145 @@ #include "gribjump/GribJump.h" -namespace gribjump { +namespace gribjump +{ -FDBService& FDBService::instance() { - static FDBService instance_; - return instance_; -} + FDBService &FDBService::instance() + { + static FDBService instance_; + return instance_; + } -FDBService::FDBService() { -} + FDBService::FDBService() + { + } -FDBService::~FDBService() { -} + FDBService::~FDBService() + { + } -std::vector FDBService::listFilesInRequest(std::vector requests) { - - eckit::AutoLock lock(this); + std::vector FDBService::listFilesInRequest(std::vector requests) + { - std::set< eckit::PathName > files; + eckit::AutoLock lock(this); - for (auto& request : requests) { + std::set files; - fdb5::FDBToolRequest fdbreq(request); - auto listIter = fdb_.list(fdbreq, true); + for (auto &request : requests) + { - fdb5::ListElement elem; - eckit::PathName last; - while (listIter.next(elem)) { - const fdb5::FieldLocation& loc = elem.location(); - LOG_DEBUG_LIB(LibGribJump) << loc << std::endl; - eckit::PathName path = loc.uri().path(); - if(path != last) { - files.insert(path); // minor optimisation + fdb5::FDBToolRequest fdbreq(request); + auto listIter = fdb_.list(fdbreq, true); + + fdb5::ListElement elem; + eckit::PathName last; + while (listIter.next(elem)) + { + const fdb5::FieldLocation &loc = elem.location(); + LOG_DEBUG_LIB(LibGribJump) << loc << std::endl; + eckit::PathName path = loc.uri().path(); + if (path != last) + { + files.insert(path); // minor optimisation + } + last = path; } - last = path; } - } - std::vector output; - std::copy(files.begin(), files.end(), std::back_inserter(output)); + std::vector output; + std::copy(files.begin(), files.end(), std::back_inserter(output)); - return output; -} + return output; + } -std::map< eckit::PathName, eckit::OffsetList > FDBService::filesOffsets(std::vector requests) { + std::map FDBService::filesOffsets(std::vector requests) + { - eckit::AutoLock lock(this); + eckit::AutoLock lock(this); - std::map< eckit::PathName, eckit::OffsetList > files; + std::map files; - for (auto& request : requests) { + for (auto &request : requests) + { - size_t count = request.count(); // worse case scenario all fields in one file + size_t count = request.count(); // worse case scenario all fields in one file - fdb5::FDBToolRequest fdbreq(request); - auto listIter = fdb_.list(fdbreq, true); + fdb5::FDBToolRequest fdbreq(request); + auto listIter = fdb_.list(fdbreq, true); - fdb5::ListElement elem; - while (listIter.next(elem)) { - - const fdb5::FieldLocation& loc = elem.location(); + fdb5::ListElement elem; + while (listIter.next(elem)) + { - eckit::PathName path = loc.uri().path(); + const fdb5::FieldLocation &loc = elem.location(); - auto it = files.find(path); - if(it == files.end()) { - eckit::OffsetList offsets; - offsets.reserve(count); - offsets.push_back(loc.offset()); - files.emplace(path, offsets); - } - else { - it->second.push_back(loc.offset()); + eckit::PathName path = loc.uri().path(); + + auto it = files.find(path); + if (it == files.end()) + { + eckit::OffsetList offsets; + offsets.reserve(count); + offsets.push_back(loc.offset()); + files.emplace(path, offsets); + } + else + { + it->second.push_back(loc.offset()); + } } } + + return files; } - return files; -} + std::map> FDBService::axes(const fdb5::FDBToolRequest &request) + { + + eckit::AutoLock lock(this); -std::map > FDBService::axes(const fdb5::FDBToolRequest& request) { + bool DEBUG_USE_FDBAXES = eckit::Resource("$GRIBJUMP_USE_FDBAXES", true); - eckit::AutoLock lock(this); + std::map> values; - bool DEBUG_USE_FDBAXES = eckit::Resource("$GRIBJUMP_USE_FDBAXES", true); + if (DEBUG_USE_FDBAXES) + { - std::map> values; + LOG_DEBUG_LIB(LibGribJump) << "Using FDB's (new) axes impl" << std::endl; - if (DEBUG_USE_FDBAXES) { - - LOG_DEBUG_LIB(LibGribJump) << "Using FDB's (new) axes impl" << std::endl; - - fdb5::IndexAxis ax = fdb_.axes(request); - ax.sort(); - std::map> fdbValues = ax.map(); + fdb5::IndexAxis ax = fdb_.axes(request); + ax.sort(); + std::map> fdbValues = ax.map(); - for (const auto& kv : fdbValues) { - if (kv.second.empty()) { - continue; + for (const auto &kv : fdbValues) + { + if (kv.second.empty()) + { + continue; + } + values[kv.first] = std::unordered_set(kv.second.begin(), kv.second.end()); } - values[kv.first] = std::unordered_set(kv.second.begin(), kv.second.end()); } - } - else { - - LOG_DEBUG_LIB(LibGribJump) << "Using GribJump's (old) axes impl" << std::endl; - - auto listIter = fdb_.list(request, true); - fdb5::ListElement elem; - while (listIter.next(elem)) { - for (const auto& key : elem.key()) { - for (const auto& param : key) { - values[param.first].insert(param.second); + else + { + + LOG_DEBUG_LIB(LibGribJump) << "Using GribJump's (old) axes impl" << std::endl; + + auto listIter = fdb_.list(request, true); + fdb5::ListElement elem; + while (listIter.next(elem)) + { + for (const auto &key : elem.key()) + { + for (const auto ¶m : key) + { + values[param.first].insert(param.second); + } } } } - } - - return values; -} + return values; + } } // namespace gribjump diff --git a/src/gribjump/tools/CMakeLists.txt b/src/gribjump/tools/CMakeLists.txt new file mode 100644 index 0000000..1834d49 --- /dev/null +++ b/src/gribjump/tools/CMakeLists.txt @@ -0,0 +1,2 @@ +# set(ProtobufIncludePath ${CMAKE_CURRENT_BINARY_DIR} +# CACHE INTERNAL "Path to generated protobuf files.") \ No newline at end of file diff --git a/src/gribjump/tools/CompressedRequestTree.cc b/src/gribjump/tools/CompressedRequestTree.cc new file mode 100644 index 0000000..9e02b54 --- /dev/null +++ b/src/gribjump/tools/CompressedRequestTree.cc @@ -0,0 +1,177 @@ +#include "CompressedRequestTree.h" +#include + +using namespace std; + +// CompressedRequestTree *Iterator::find_next_sibling(CompressedRequestTree *parent, CompressedRequestTree *child) +// { +// auto it = find(parent->_children.begin(), parent->_children.end(), child); +// if (it != parent->_children.end()) +// { +// ++it; +// if (it != parent->_children.end()) +// { +// return *it; +// } +// else +// { +// return nullptr; +// } +// } +// return nullptr; +// } + +void Iterator::go_to_first_leaf_from(Path &path, ItPath &its) +{ + // while (!path.top().first->_children.empty()) + // { + // auto it = path.top().first->_children.begin(); + // path.push({*it, move(it)}); + // } + while (its.back() != path.back()->_children.end()) + { + auto &t = its.back(); + path.push_back(*t); + its.push_back((*t)->_children.begin()); + } +} + +Iterator & +Iterator::operator++() +{ + if (!val_.empty()) + { + assert(val_.back()->_children.empty()); + // do something + + for (;;) + { + val_.pop_back(); + its_.pop_back(); + if (val_.empty()) + { + // very end of iteration where we have no more leaves + break; + } + + auto next = ++its_.back(); + + if (next != val_.back()->_children.end()) + { + val_.push_back(*next); + its_.push_back((*next)->_children.begin()); + go_to_first_leaf_from(val_, its_); + break; + } + } + } + + return *this; +} + +Iterator Iterator::operator++(int) +{ + This current(val_); + ++(*this); + return current; +} + +Iterator::Iterator(CompressedRequestTree *root) +{ + val_.push_back(root); + its_.push_back(root->_children.begin()); + go_to_first_leaf_from(val_, its_); +} + +std::unique_ptr CompressedRequestTree::NoneTree = std::make_unique(CompressedRequestTree("None")); + +CompressedRequestTree::CompressedRequestTree(const string axis, vector values) +{ + _values = values; + _axis = axis; + _parent = NoneTree.get(); + _results = nullptr; +} + +string CompressedRequestTree::get_axis() +{ + return _axis; +} + +CompressedRequestTree::~CompressedRequestTree() +{ +} + +void CompressedRequestTree::set_result(vector *results) +{ + _results = results; +} + +void CompressedRequestTree::set_indexes(vector indexes) +{ + _indexes = indexes; +} + +void CompressedRequestTree::set_result_size(vector result_size) +{ + _result_size = result_size; +} + +CompressedRequestTree *CompressedRequestTree::create_child(const string axis, vector values) +{ + + CompressedRequestTree *node = new CompressedRequestTree(axis, values); + this->add_child(node); + return node; +} + +void CompressedRequestTree::add_child(CompressedRequestTree *node) +{ + _children.push_back(node); + (node)->set_parent(this); +} + +void CompressedRequestTree::set_parent(CompressedRequestTree *node) +{ + const string axis = (_parent)->_axis; + if (axis != "None") + { + auto it = find((*_parent)._children.begin(), (*_parent)._children.end(), this); + vector *parents_children = &(*_parent)._children; + if (it != parents_children->end()) + { + parents_children->erase(it); + } + } + _parent = node; +} + +ostream &operator<<(std::ostream &os, const CompressedRequestTree &obj) +{ + if (obj._axis != "root") + { + os << obj._axis << "=" + << "["; + for (int i = 0; i < size(obj._values); i++) + { + os << obj._values[i] << ","; + } + os << "]"; + return os; + } + else + { + os << obj._axis; + return os; + } +} + +void CompressedRequestTree::pprint(int level) +{ + string tabs(level, '\t'); + cout << tabs << "\u21b3" << *this << endl; + for (const CompressedRequestTree *child : _children) + { + (*const_cast(child)).pprint(level + 1); + } +} diff --git a/src/gribjump/tools/CompressedRequestTree.h b/src/gribjump/tools/CompressedRequestTree.h new file mode 100644 index 0000000..109b7f4 --- /dev/null +++ b/src/gribjump/tools/CompressedRequestTree.h @@ -0,0 +1,233 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +class CompressedRequestTree; + +struct Iterator +{ + using ChildIt = typename vector::iterator; + using Path = deque; + + using This = Iterator; + + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = Path; + using pointer = const value_type *; + using reference = const value_type &; + using ItPath = deque; + + // using const_ref = const value_type &; + // using const_ptr = const value_type *; + + // keep path in a deque instead of stack + friend class CompressedRequestTree; + + value_type val_; + ItPath its_; + + reference operator*() const { return val_; } + reference operator*() { return val_; } + + pointer operator->() const { return &val_; } + pointer operator->() { return &val_; } + + This &operator=(const This &other) = default; + // { + // val_ = other.val_; + // return *this; + // } + This &operator=(This &&other) = default; + // { + // val_ = std::move(other.val_); + // return *this; + // } + + CompressedRequestTree *find_next_sibling(CompressedRequestTree *parent, CompressedRequestTree *child); + + void go_to_first_leaf_from(Path &path, ItPath &its); + + This & + operator++(); + + This operator++(int); + + bool operator==(const This &other) const noexcept { return val_ == other.val_; } + + bool operator!=(const This &other) const noexcept { return val_ != other.val_; } + + Iterator(CompressedRequestTree *root); + + Iterator() = default; + Iterator(const This &) = default; + Iterator(This &&) = default; + + Iterator(const Path &path) : val_{path} {} +}; + +class CompressedRequestTree +{ +public: + using iterator = Iterator; + // TBD + // using const_iterator = Iterator; + + iterator begin() { return Iterator{this}; } + iterator end() { return Iterator{}; } + + static std::unique_ptr NoneTree; + + CompressedRequestTree *_parent; + vector _children; + + vector _values; + string _axis; + vector _indexes; // this is for the indexes of the grid + + vector *_results; + vector _result_size; + vector _indexes_branch_size; + + CompressedRequestTree(const string axis = "root", vector values = {""}); + ~CompressedRequestTree(); + + string get_axis(); + + void set_result(vector *results); + void set_indexes(vector indexes); + void set_result_size(vector result_size); + + CompressedRequestTree *create_child(const string axis, vector values); + void add_child(CompressedRequestTree *node); + void set_parent(CompressedRequestTree *node); + + friend ostream &operator<<(std::ostream &os, const CompressedRequestTree &obj); + + void pprint(int level = 0); +}; + +// struct Iterator +// { +// using Path = std::stack; + +// using This = Iterator; + +// using iterator_category = std::forward_iterator_tag; +// using difference_type = std::ptrdiff_t; +// using value_type = Path; +// using pointer = value_type *; +// using reference = value_type &; + +// // keep path in stack +// friend class CompressedRequestTree; +// Iterator &operator++() noexcept; + +// value_type val_; + +// const reference operator*() const { return val_; } +// reference operator*() { return val_; } + +// const pointer operator->() const { return &val_; } +// pointer operator->() { return &val_; } + +// This &operator=(const This &other) = default; +// // { +// // val_ = other.val_; +// // return *this; +// // } +// This &operator=(This &&other) = default; +// // { +// // val_ = std::move(other.val_); +// // return *this; +// // } + +// CompressedRequestTree *find_next_sibling(CompressedRequestTree *parent, CompressedRequestTree *child) +// { +// auto it = find(parent->_children.begin(), parent->_children.end(), child); +// if (it != parent->_children.end()) +// { +// ++it; +// if (it != parent->_children.end()) +// { +// return *it; +// } +// else +// { +// return nullptr; +// } +// } +// return nullptr; +// } + +// void go_to_first_leaf_from(Path &path) +// { +// while (!path.top()->_children.empty()) +// { +// path.push(path.top()->_children[0]); +// } +// } + +// This & +// operator++() +// { +// if (!val_.empty()) +// { +// assert(val_.top()->_children.empty()); +// // do something + +// for (;;) +// { +// CompressedRequestTree *current_child = val_.top(); +// val_.pop(); +// // assert(!val_.empty()); +// if (!val_.empty()) +// { +// // very end of iteration where we have no more leaves +// break; +// } + +// CompressedRequestTree *parent = val_.top(); +// CompressedRequestTree *next_sibling = find_next_sibling(parent, current_child); +// if (next_sibling != nullptr) +// { +// val_.push(next_sibling); +// go_to_first_leaf_from(val_); +// break; +// } +// } +// } + +// return *this; +// } + +// This operator++(int) +// { +// This current(val_); +// ++(*this); +// return current; +// } + +// bool operator==(const This &other) const noexcept { return val_ == other.val_; } + +// bool operator!=(const This &other) const noexcept { return val_ != other.val_; } + +// Iterator(CompressedRequestTree *root) +// { +// val_.push(root); +// go_to_first_leaf_from(val_); +// } + +// Iterator() = default; +// Iterator(const This &) = default; +// Iterator(This &&) = default; + +// Iterator(const Path &path) : val_{path} {} +// }; diff --git a/src/gribjump/tools/TreeEncodings.cc b/src/gribjump/tools/TreeEncodings.cc new file mode 100644 index 0000000..871f4aa --- /dev/null +++ b/src/gribjump/tools/TreeEncodings.cc @@ -0,0 +1,108 @@ +#include "index_tree.pb.h" +#include "CompressedRequestTree.h" +using namespace std; + +void encode_child(CompressedRequestTree &tree, CompressedRequestTree *child, index_tree::Node *node) +{ + index_tree::Node *child_node = node->add_children(); + + child_node->set_axis(child->_axis); + + if (size(child->_children) == 0) + { + for (int size : child->_result_size) + { + child_node->add_size_result(size); + } + for (int index : child->_indexes) + { + child_node->add_indexes(index); + } + if (child->_results != nullptr) + { + for (double result : *(child->_results)) + { + child_node->add_result(result); + } + } + } + for (string child_val : child->_values) + { + child_node->add_value(child_val); + } + for (CompressedRequestTree *c : child->_children) + { + encode_child(*child, c, child_node); + } +} + +string *encode(CompressedRequestTree &tree) +{ + index_tree::Node *node = new index_tree::Node; + node->set_axis(tree._axis); + if (tree._results != nullptr) + { + for (double result : *(tree._results)) + { + node->add_result(result); + } + } + for (CompressedRequestTree *c : tree._children) + { + encode_child(tree, c, node); + } + int size = node->ByteSizeLong(); + string *array = new string[size]; + node->SerializeToString(array); + return array; +} + +void decode_child(index_tree::Node *node, CompressedRequestTree *tree) +{ + if (node->children_size() == 0) + { + for (int i = 0; i < node->result_size(); i++) + { + tree->_results->push_back(node->result(i)); + } + for (int i = 0; i < node->size_result_size(); i++) + { + tree->_result_size.push_back(node->size_result(i)); + } + for (int i = 0; i < node->indexes_size(); i++) + { + tree->_indexes.push_back(node->indexes(i)); + } + for (int i = 0; i < node->size_indexes_branch_size(); i++) + { + tree->_indexes_branch_size.push_back(node->size_indexes_branch(i)); + } + } + for (int i = 0; i < node->children_size(); i++) + { + index_tree::Node child = node->children(i); + string child_axis = child.axis(); + vector child_vals = {}; + for (int j = 0; j < child.value_size(); j++) + { + child_vals.push_back(child.value(j)); + } + CompressedRequestTree *child_node = new CompressedRequestTree(child_axis, child_vals); + tree->add_child(child_node); + decode_child(&child, child_node); + } +} + +CompressedRequestTree *decode(string *tree_node) +{ + index_tree::Node *node = new index_tree::Node; + node->ParseFromString(*tree_node); + CompressedRequestTree *tree = new CompressedRequestTree(); + + if (node->axis() != "root") + { + tree->_axis = node->axis(); + } + decode_child(node, tree); + return tree; +} diff --git a/src/gribjump/tools/TreeEncodings.h b/src/gribjump/tools/TreeEncodings.h new file mode 100644 index 0000000..238f3c6 --- /dev/null +++ b/src/gribjump/tools/TreeEncodings.h @@ -0,0 +1,11 @@ +#include "index_tree.pb.h" +#include "CompressedRequestTree.h" +using namespace std; + +void encode_child(CompressedRequestTree &tree, CompressedRequestTree *child, index_tree::Node *node, vector result_size = {}); + +string *encode(CompressedRequestTree &tree); + +void decode_child(index_tree::Node *node, CompressedRequestTree *tree); + +CompressedRequestTree *decode(string *tree_node); diff --git a/src/gribjump/tools/index_tree.pb.cc b/src/gribjump/tools/index_tree.pb.cc new file mode 100644 index 0000000..7dda216 --- /dev/null +++ b/src/gribjump/tools/index_tree.pb.cc @@ -0,0 +1,526 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: index_tree.proto +// Protobuf C++ Version: 5.26.1 + +#include "index_tree.pb.h" + +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace index_tree { + +inline constexpr Node::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{}, + indexes_{}, + _indexes_cached_byte_size_{0}, + result_{}, + size_result_{}, + _size_result_cached_byte_size_{0}, + children_{}, + size_indexes_branch_{}, + _size_indexes_branch_cached_byte_size_{0}, + axis_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Node::Node(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct NodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR NodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~NodeDefaultTypeInternal() {} + union { + Node _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeDefaultTypeInternal _Node_default_instance_; +} // namespace index_tree +static ::_pb::Metadata file_level_metadata_index_5ftree_2eproto[1]; +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_index_5ftree_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_index_5ftree_2eproto = nullptr; +const ::uint32_t + TableStruct_index_5ftree_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.axis_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.indexes_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.size_result_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.children_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.size_indexes_branch_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::index_tree::Node)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::index_tree::_Node_default_instance_._instance, +}; +const char descriptor_table_protodef_index_5ftree_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\020index_tree.proto\022\nindex_tree\"\232\001\n\004Node\022" + "\014\n\004axis\030\001 \001(\t\022\r\n\005value\030\002 \003(\t\022\017\n\007indexes\030" + "\003 \003(\003\022\016\n\006result\030\004 \003(\001\022\023\n\013size_result\030\005 \003" + "(\003\022\"\n\010children\030\006 \003(\0132\020.index_tree.Node\022\033" + "\n\023size_indexes_branch\030\007 \003(\003b\006proto3" +}; +static ::absl::once_flag descriptor_table_index_5ftree_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_index_5ftree_2eproto = { + false, + false, + 195, + descriptor_table_protodef_index_5ftree_2eproto, + "index_tree.proto", + &descriptor_table_index_5ftree_2eproto_once, + nullptr, + 0, + 1, + schemas, + file_default_instances, + TableStruct_index_5ftree_2eproto::offsets, + file_level_metadata_index_5ftree_2eproto, + file_level_enum_descriptors_index_5ftree_2eproto, + file_level_service_descriptors_index_5ftree_2eproto, +}; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_index_5ftree_2eproto_getter() { + return &descriptor_table_index_5ftree_2eproto; +} +namespace index_tree { +// =================================================================== + +class Node::_Internal { + public: +}; + +Node::Node(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:index_tree.Node) +} +inline PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : value_{visibility, arena, from.value_}, + indexes_{visibility, arena, from.indexes_}, + _indexes_cached_byte_size_{0}, + result_{visibility, arena, from.result_}, + size_result_{visibility, arena, from.size_result_}, + _size_result_cached_byte_size_{0}, + children_{visibility, arena, from.children_}, + size_indexes_branch_{visibility, arena, from.size_indexes_branch_}, + _size_indexes_branch_cached_byte_size_{0}, + axis_(arena, from.axis_), + _cached_size_{0} {} + +Node::Node( + ::google::protobuf::Arena* arena, + const Node& from) + : ::google::protobuf::Message(arena) { + Node* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + + // @@protoc_insertion_point(copy_constructor:index_tree.Node) +} +inline PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : value_{visibility, arena}, + indexes_{visibility, arena}, + _indexes_cached_byte_size_{0}, + result_{visibility, arena}, + size_result_{visibility, arena}, + _size_result_cached_byte_size_{0}, + children_{visibility, arena}, + size_indexes_branch_{visibility, arena}, + _size_indexes_branch_cached_byte_size_{0}, + axis_(arena), + _cached_size_{0} {} + +inline void Node::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Node::~Node() { + // @@protoc_insertion_point(destructor:index_tree.Node) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Node::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.axis_.Destroy(); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Node::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // OnDemandRegisterArenaDtor + PROTOBUF_FIELD_OFFSET(Node, _impl_._cached_size_), + false, + }, + &Node::MergeImpl, + &Node::kDescriptorMethods, + }; + return &_data_; +} +PROTOBUF_NOINLINE void Node::Clear() { +// @@protoc_insertion_point(message_clear_start:index_tree.Node) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.value_.Clear(); + _impl_.indexes_.Clear(); + _impl_.result_.Clear(); + _impl_.size_result_.Clear(); + _impl_.children_.Clear(); + _impl_.size_indexes_branch_.Clear(); + _impl_.axis_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Node::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 1, 33, 2> Node::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Node_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::index_tree::Node>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string axis = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.axis_)}}, + // repeated string value = 2; + {::_pbi::TcParser::FastUR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.value_)}}, + // repeated int64 indexes = 3; + {::_pbi::TcParser::FastV64P1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.indexes_)}}, + // repeated double result = 4; + {::_pbi::TcParser::FastF64P1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.result_)}}, + // repeated int64 size_result = 5; + {::_pbi::TcParser::FastV64P1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.size_result_)}}, + // repeated .index_tree.Node children = 6; + {::_pbi::TcParser::FastMtR1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.children_)}}, + // repeated int64 size_indexes_branch = 7; + {::_pbi::TcParser::FastV64P1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.size_indexes_branch_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string axis = 1; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.axis_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated string value = 2; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.value_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // repeated int64 indexes = 3; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.indexes_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // repeated double result = 4; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.result_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, + // repeated int64 size_result = 5; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.size_result_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // repeated .index_tree.Node children = 6; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.children_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int64 size_indexes_branch = 7; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.size_indexes_branch_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::index_tree::Node>()}, + }}, {{ + "\17\4\5\0\0\0\0\0" + "index_tree.Node" + "axis" + "value" + }}, +}; + +::uint8_t* Node::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:index_tree.Node) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string axis = 1; + if (!this->_internal_axis().empty()) { + const std::string& _s = this->_internal_axis(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "index_tree.Node.axis"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated string value = 2; + for (int i = 0, n = this->_internal_value_size(); i < n; ++i) { + const auto& s = this->_internal_value().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "index_tree.Node.value"); + target = stream->WriteString(2, s, target); + } + + // repeated int64 indexes = 3; + { + int byte_size = _impl_._indexes_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 3, _internal_indexes(), byte_size, target); + } + } + + // repeated double result = 4; + if (this->_internal_result_size() > 0) { + target = stream->WriteFixedPacked(4, _internal_result(), target); + } + + // repeated int64 size_result = 5; + { + int byte_size = _impl_._size_result_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 5, _internal_size_result(), byte_size, target); + } + } + + // repeated .index_tree.Node children = 6; + for (unsigned i = 0, n = static_cast( + this->_internal_children_size()); + i < n; i++) { + const auto& repfield = this->_internal_children().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated int64 size_indexes_branch = 7; + { + int byte_size = _impl_._size_indexes_branch_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 7, _internal_size_indexes_branch(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:index_tree.Node) + return target; +} + +::size_t Node::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:index_tree.Node) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string value = 2; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_value().size()); + for (int i = 0, n = _internal_value().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_value().Get(i)); + } + // repeated int64 indexes = 3; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_indexes()) + ; + _impl_._indexes_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated double result = 4; + { + std::size_t data_size = std::size_t{8} * + ::_pbi::FromIntSize(this->_internal_result_size()) + ; + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated int64 size_result = 5; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_size_result()) + ; + _impl_._size_result_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated .index_tree.Node children = 6; + total_size += 1UL * this->_internal_children_size(); + for (const auto& msg : this->_internal_children()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // repeated int64 size_indexes_branch = 7; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_size_indexes_branch()) + ; + _impl_._size_indexes_branch_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // string axis = 1; + if (!this->_internal_axis().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_axis()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Node::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:index_tree.Node) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_value()->MergeFrom(from._internal_value()); + _this->_internal_mutable_indexes()->MergeFrom(from._internal_indexes()); + _this->_internal_mutable_result()->MergeFrom(from._internal_result()); + _this->_internal_mutable_size_result()->MergeFrom(from._internal_size_result()); + _this->_internal_mutable_children()->MergeFrom( + from._internal_children()); + _this->_internal_mutable_size_indexes_branch()->MergeFrom(from._internal_size_indexes_branch()); + if (!from._internal_axis().empty()) { + _this->_internal_set_axis(from._internal_axis()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Node::CopyFrom(const Node& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:index_tree.Node) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool Node::IsInitialized() const { + return true; +} + +void Node::InternalSwap(Node* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.value_.InternalSwap(&other->_impl_.value_); + _impl_.indexes_.InternalSwap(&other->_impl_.indexes_); + _impl_.result_.InternalSwap(&other->_impl_.result_); + _impl_.size_result_.InternalSwap(&other->_impl_.size_result_); + _impl_.children_.InternalSwap(&other->_impl_.children_); + _impl_.size_indexes_branch_.InternalSwap(&other->_impl_.size_indexes_branch_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.axis_, &other->_impl_.axis_, arena); +} + +::google::protobuf::Metadata Node::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_index_5ftree_2eproto_getter, + &descriptor_table_index_5ftree_2eproto_once, + file_level_metadata_index_5ftree_2eproto[0]); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace index_tree +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_index_5ftree_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/src/gribjump/tools/index_tree.pb.h b/src/gribjump/tools/index_tree.pb.h new file mode 100644 index 0000000..6eaab93 --- /dev/null +++ b/src/gribjump/tools/index_tree.pb.h @@ -0,0 +1,782 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: index_tree.proto +// Protobuf C++ Version: 5.26.1 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_index_5ftree_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_index_5ftree_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_index_5ftree_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_index_5ftree_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_index_5ftree_2eproto; +namespace index_tree { +class Node; +struct NodeDefaultTypeInternal; +extern NodeDefaultTypeInternal _Node_default_instance_; +} // namespace index_tree +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace index_tree { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Node final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:index_tree.Node) */ { + public: + inline Node() : Node(nullptr) {} + ~Node() override; + template + explicit PROTOBUF_CONSTEXPR Node( + ::google::protobuf::internal::ConstantInitialized); + + inline Node(const Node& from) : Node(nullptr, from) {} + inline Node(Node&& from) noexcept + : Node(nullptr, std::move(from)) {} + inline Node& operator=(const Node& from) { + CopyFrom(from); + return *this; + } + inline Node& operator=(Node&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Node& default_instance() { + return *internal_default_instance(); + } + static inline const Node* internal_default_instance() { + return reinterpret_cast( + &_Node_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Node& a, Node& b) { a.Swap(&b); } + inline void Swap(Node* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Node* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Node* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Node& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Node& from) { Node::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Node* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "index_tree.Node"; } + + protected: + explicit Node(::google::protobuf::Arena* arena); + Node(::google::protobuf::Arena* arena, const Node& from); + Node(::google::protobuf::Arena* arena, Node&& from) noexcept + : Node(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 2, + kIndexesFieldNumber = 3, + kResultFieldNumber = 4, + kSizeResultFieldNumber = 5, + kChildrenFieldNumber = 6, + kSizeIndexesBranchFieldNumber = 7, + kAxisFieldNumber = 1, + }; + // repeated string value = 2; + int value_size() const; + private: + int _internal_value_size() const; + + public: + void clear_value() ; + const std::string& value(int index) const; + std::string* mutable_value(int index); + void set_value(int index, const std::string& value); + void set_value(int index, std::string&& value); + void set_value(int index, const char* value); + void set_value(int index, const char* value, std::size_t size); + void set_value(int index, absl::string_view value); + std::string* add_value(); + void add_value(const std::string& value); + void add_value(std::string&& value); + void add_value(const char* value); + void add_value(const char* value, std::size_t size); + void add_value(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& value() const; + ::google::protobuf::RepeatedPtrField* mutable_value(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_value() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_value(); + + public: + // repeated int64 indexes = 3; + int indexes_size() const; + private: + int _internal_indexes_size() const; + + public: + void clear_indexes() ; + ::int64_t indexes(int index) const; + void set_indexes(int index, ::int64_t value); + void add_indexes(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& indexes() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_indexes(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_indexes() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_indexes(); + + public: + // repeated double result = 4; + int result_size() const; + private: + int _internal_result_size() const; + + public: + void clear_result() ; + double result(int index) const; + void set_result(int index, double value); + void add_result(double value); + const ::google::protobuf::RepeatedField& result() const; + ::google::protobuf::RepeatedField* mutable_result(); + + private: + const ::google::protobuf::RepeatedField& _internal_result() const; + ::google::protobuf::RepeatedField* _internal_mutable_result(); + + public: + // repeated int64 size_result = 5; + int size_result_size() const; + private: + int _internal_size_result_size() const; + + public: + void clear_size_result() ; + ::int64_t size_result(int index) const; + void set_size_result(int index, ::int64_t value); + void add_size_result(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& size_result() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_size_result(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_size_result() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_size_result(); + + public: + // repeated .index_tree.Node children = 6; + int children_size() const; + private: + int _internal_children_size() const; + + public: + void clear_children() ; + ::index_tree::Node* mutable_children(int index); + ::google::protobuf::RepeatedPtrField<::index_tree::Node>* mutable_children(); + + private: + const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& _internal_children() const; + ::google::protobuf::RepeatedPtrField<::index_tree::Node>* _internal_mutable_children(); + public: + const ::index_tree::Node& children(int index) const; + ::index_tree::Node* add_children(); + const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& children() const; + // repeated int64 size_indexes_branch = 7; + int size_indexes_branch_size() const; + private: + int _internal_size_indexes_branch_size() const; + + public: + void clear_size_indexes_branch() ; + ::int64_t size_indexes_branch(int index) const; + void set_size_indexes_branch(int index, ::int64_t value); + void add_size_indexes_branch(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& size_indexes_branch() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_size_indexes_branch(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_size_indexes_branch() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_size_indexes_branch(); + + public: + // string axis = 1; + void clear_axis() ; + const std::string& axis() const; + template + void set_axis(Arg_&& arg, Args_... args); + std::string* mutable_axis(); + PROTOBUF_NODISCARD std::string* release_axis(); + void set_allocated_axis(std::string* value); + + private: + const std::string& _internal_axis() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_axis( + const std::string& value); + std::string* _internal_mutable_axis(); + + public: + // @@protoc_insertion_point(class_scope:index_tree.Node) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 1, + 33, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField value_; + ::google::protobuf::RepeatedField<::int64_t> indexes_; + mutable ::google::protobuf::internal::CachedSize _indexes_cached_byte_size_; + ::google::protobuf::RepeatedField result_; + ::google::protobuf::RepeatedField<::int64_t> size_result_; + mutable ::google::protobuf::internal::CachedSize _size_result_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::index_tree::Node > children_; + ::google::protobuf::RepeatedField<::int64_t> size_indexes_branch_; + mutable ::google::protobuf::internal::CachedSize _size_indexes_branch_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr axis_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_index_5ftree_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Node + +// string axis = 1; +inline void Node::clear_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.ClearToEmpty(); +} +inline const std::string& Node::axis() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.axis) + return _internal_axis(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Node::set_axis(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:index_tree.Node.axis) +} +inline std::string* Node::mutable_axis() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_axis(); + // @@protoc_insertion_point(field_mutable:index_tree.Node.axis) + return _s; +} +inline const std::string& Node::_internal_axis() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.axis_.Get(); +} +inline void Node::_internal_set_axis(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.Set(value, GetArena()); +} +inline std::string* Node::_internal_mutable_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _impl_.axis_.Mutable( GetArena()); +} +inline std::string* Node::release_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:index_tree.Node.axis) + return _impl_.axis_.Release(); +} +inline void Node::set_allocated_axis(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.axis_.IsDefault()) { + _impl_.axis_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:index_tree.Node.axis) +} + +// repeated string value = 2; +inline int Node::_internal_value_size() const { + return _internal_value().size(); +} +inline int Node::value_size() const { + return _internal_value_size(); +} +inline void Node::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.Clear(); +} +inline std::string* Node::add_value() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_value()->Add(); + // @@protoc_insertion_point(field_add_mutable:index_tree.Node.value) + return _s; +} +inline const std::string& Node::value(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.value) + return _internal_value().Get(index); +} +inline std::string* Node::mutable_value(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:index_tree.Node.value) + return _internal_mutable_value()->Mutable(index); +} +inline void Node::set_value(int index, const std::string& value) { + _internal_mutable_value()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:index_tree.Node.value) +} +inline void Node::set_value(int index, std::string&& value) { + _internal_mutable_value()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:index_tree.Node.value) +} +inline void Node::set_value(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_value()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:index_tree.Node.value) +} +inline void Node::set_value(int index, const char* value, + std::size_t size) { + _internal_mutable_value()->Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:index_tree.Node.value) +} +inline void Node::set_value(int index, absl::string_view value) { + _internal_mutable_value()->Mutable(index)->assign( + value.data(), value.size()); + // @@protoc_insertion_point(field_set_string_piece:index_tree.Node.value) +} +inline void Node::add_value(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value); + // @@protoc_insertion_point(field_add:index_tree.Node.value) +} +inline void Node::add_value(std::string&& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:index_tree.Node.value) +} +inline void Node::add_value(const char* value) { + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:index_tree.Node.value) +} +inline void Node::add_value(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:index_tree.Node.value) +} +inline void Node::add_value(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_add_string_piece:index_tree.Node.value) +} +inline const ::google::protobuf::RepeatedPtrField& +Node::value() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.value) + return _internal_value(); +} +inline ::google::protobuf::RepeatedPtrField* +Node::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.value) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_value(); +} +inline const ::google::protobuf::RepeatedPtrField& +Node::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.value_; +} +inline ::google::protobuf::RepeatedPtrField* +Node::_internal_mutable_value() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.value_; +} + +// repeated int64 indexes = 3; +inline int Node::_internal_indexes_size() const { + return _internal_indexes().size(); +} +inline int Node::indexes_size() const { + return _internal_indexes_size(); +} +inline void Node::clear_indexes() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.indexes_.Clear(); +} +inline ::int64_t Node::indexes(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.indexes) + return _internal_indexes().Get(index); +} +inline void Node::set_indexes(int index, ::int64_t value) { + _internal_mutable_indexes()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.indexes) +} +inline void Node::add_indexes(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_indexes()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.indexes) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Node::indexes() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.indexes) + return _internal_indexes(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::mutable_indexes() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.indexes) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_indexes(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Node::_internal_indexes() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.indexes_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::_internal_mutable_indexes() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.indexes_; +} + +// repeated double result = 4; +inline int Node::_internal_result_size() const { + return _internal_result().size(); +} +inline int Node::result_size() const { + return _internal_result_size(); +} +inline void Node::clear_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.result_.Clear(); +} +inline double Node::result(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.result) + return _internal_result().Get(index); +} +inline void Node::set_result(int index, double value) { + _internal_mutable_result()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.result) +} +inline void Node::add_result(double value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_result()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.result) +} +inline const ::google::protobuf::RepeatedField& Node::result() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.result) + return _internal_result(); +} +inline ::google::protobuf::RepeatedField* Node::mutable_result() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.result) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_result(); +} +inline const ::google::protobuf::RepeatedField& +Node::_internal_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.result_; +} +inline ::google::protobuf::RepeatedField* Node::_internal_mutable_result() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.result_; +} + +// repeated int64 size_result = 5; +inline int Node::_internal_size_result_size() const { + return _internal_size_result().size(); +} +inline int Node::size_result_size() const { + return _internal_size_result_size(); +} +inline void Node::clear_size_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.size_result_.Clear(); +} +inline ::int64_t Node::size_result(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.size_result) + return _internal_size_result().Get(index); +} +inline void Node::set_size_result(int index, ::int64_t value) { + _internal_mutable_size_result()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.size_result) +} +inline void Node::add_size_result(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_size_result()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.size_result) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Node::size_result() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.size_result) + return _internal_size_result(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::mutable_size_result() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.size_result) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_size_result(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Node::_internal_size_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.size_result_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::_internal_mutable_size_result() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.size_result_; +} + +// repeated .index_tree.Node children = 6; +inline int Node::_internal_children_size() const { + return _internal_children().size(); +} +inline int Node::children_size() const { + return _internal_children_size(); +} +inline void Node::clear_children() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.children_.Clear(); +} +inline ::index_tree::Node* Node::mutable_children(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:index_tree.Node.children) + return _internal_mutable_children()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::index_tree::Node>* Node::mutable_children() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.children) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_children(); +} +inline const ::index_tree::Node& Node::children(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.children) + return _internal_children().Get(index); +} +inline ::index_tree::Node* Node::add_children() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::index_tree::Node* _add = _internal_mutable_children()->Add(); + // @@protoc_insertion_point(field_add:index_tree.Node.children) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& Node::children() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.children) + return _internal_children(); +} +inline const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& +Node::_internal_children() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.children_; +} +inline ::google::protobuf::RepeatedPtrField<::index_tree::Node>* +Node::_internal_mutable_children() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.children_; +} + +// repeated int64 size_indexes_branch = 7; +inline int Node::_internal_size_indexes_branch_size() const { + return _internal_size_indexes_branch().size(); +} +inline int Node::size_indexes_branch_size() const { + return _internal_size_indexes_branch_size(); +} +inline void Node::clear_size_indexes_branch() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.size_indexes_branch_.Clear(); +} +inline ::int64_t Node::size_indexes_branch(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.size_indexes_branch) + return _internal_size_indexes_branch().Get(index); +} +inline void Node::set_size_indexes_branch(int index, ::int64_t value) { + _internal_mutable_size_indexes_branch()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.size_indexes_branch) +} +inline void Node::add_size_indexes_branch(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_size_indexes_branch()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.size_indexes_branch) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Node::size_indexes_branch() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.size_indexes_branch) + return _internal_size_indexes_branch(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::mutable_size_indexes_branch() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.size_indexes_branch) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_size_indexes_branch(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Node::_internal_size_indexes_branch() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.size_indexes_branch_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::_internal_mutable_size_indexes_branch() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.size_indexes_branch_; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace index_tree + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_index_5ftree_2eproto_2epb_2eh diff --git a/src/gribjump/tools/index_tree.proto b/src/gribjump/tools/index_tree.proto new file mode 100644 index 0000000..c672372 --- /dev/null +++ b/src/gribjump/tools/index_tree.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package index_tree; + +message Node { + string axis = 1; + repeated string value = 2; + repeated int64 indexes = 3; + repeated double result = 4; + repeated int64 size_result = 5; + repeated Node children = 6; + repeated int64 size_indexes_branch = 7; +} \ No newline at end of file diff --git a/src/gribjump/tools/src/gribjump/tools/index_tree.pb.cc b/src/gribjump/tools/src/gribjump/tools/index_tree.pb.cc new file mode 100644 index 0000000..d715b39 --- /dev/null +++ b/src/gribjump/tools/src/gribjump/tools/index_tree.pb.cc @@ -0,0 +1,489 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/gribjump/tools/index_tree.proto +// Protobuf C++ Version: 5.26.1 + +#include "src/gribjump/tools/index_tree.pb.h" + +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace index_tree { + +inline constexpr Node::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{}, + indexes_{}, + _indexes_cached_byte_size_{0}, + result_{}, + size_result_{}, + _size_result_cached_byte_size_{0}, + children_{}, + axis_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Node::Node(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct NodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR NodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~NodeDefaultTypeInternal() {} + union { + Node _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeDefaultTypeInternal _Node_default_instance_; +} // namespace index_tree +static ::_pb::Metadata file_level_metadata_src_2fgribjump_2ftools_2findex_5ftree_2eproto[1]; +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_src_2fgribjump_2ftools_2findex_5ftree_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_src_2fgribjump_2ftools_2findex_5ftree_2eproto = nullptr; +const ::uint32_t + TableStruct_src_2fgribjump_2ftools_2findex_5ftree_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.axis_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.indexes_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.size_result_), + PROTOBUF_FIELD_OFFSET(::index_tree::Node, _impl_.children_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::index_tree::Node)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::index_tree::_Node_default_instance_._instance, +}; +const char descriptor_table_protodef_src_2fgribjump_2ftools_2findex_5ftree_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n#src/gribjump/tools/index_tree.proto\022\ni" + "ndex_tree\"}\n\004Node\022\014\n\004axis\030\001 \001(\t\022\r\n\005value" + "\030\002 \003(\t\022\017\n\007indexes\030\003 \003(\003\022\016\n\006result\030\004 \003(\001\022" + "\023\n\013size_result\030\005 \003(\003\022\"\n\010children\030\006 \003(\0132\020" + ".index_tree.Nodeb\006proto3" +}; +static ::absl::once_flag descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto = { + false, + false, + 184, + descriptor_table_protodef_src_2fgribjump_2ftools_2findex_5ftree_2eproto, + "src/gribjump/tools/index_tree.proto", + &descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto_once, + nullptr, + 0, + 1, + schemas, + file_default_instances, + TableStruct_src_2fgribjump_2ftools_2findex_5ftree_2eproto::offsets, + file_level_metadata_src_2fgribjump_2ftools_2findex_5ftree_2eproto, + file_level_enum_descriptors_src_2fgribjump_2ftools_2findex_5ftree_2eproto, + file_level_service_descriptors_src_2fgribjump_2ftools_2findex_5ftree_2eproto, +}; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto_getter() { + return &descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto; +} +namespace index_tree { +// =================================================================== + +class Node::_Internal { + public: +}; + +Node::Node(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:index_tree.Node) +} +inline PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : value_{visibility, arena, from.value_}, + indexes_{visibility, arena, from.indexes_}, + _indexes_cached_byte_size_{0}, + result_{visibility, arena, from.result_}, + size_result_{visibility, arena, from.size_result_}, + _size_result_cached_byte_size_{0}, + children_{visibility, arena, from.children_}, + axis_(arena, from.axis_), + _cached_size_{0} {} + +Node::Node( + ::google::protobuf::Arena* arena, + const Node& from) + : ::google::protobuf::Message(arena) { + Node* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + + // @@protoc_insertion_point(copy_constructor:index_tree.Node) +} +inline PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : value_{visibility, arena}, + indexes_{visibility, arena}, + _indexes_cached_byte_size_{0}, + result_{visibility, arena}, + size_result_{visibility, arena}, + _size_result_cached_byte_size_{0}, + children_{visibility, arena}, + axis_(arena), + _cached_size_{0} {} + +inline void Node::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Node::~Node() { + // @@protoc_insertion_point(destructor:index_tree.Node) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Node::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.axis_.Destroy(); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Node::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // OnDemandRegisterArenaDtor + PROTOBUF_FIELD_OFFSET(Node, _impl_._cached_size_), + false, + }, + &Node::MergeImpl, + &Node::kDescriptorMethods, + }; + return &_data_; +} +PROTOBUF_NOINLINE void Node::Clear() { +// @@protoc_insertion_point(message_clear_start:index_tree.Node) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.value_.Clear(); + _impl_.indexes_.Clear(); + _impl_.result_.Clear(); + _impl_.size_result_.Clear(); + _impl_.children_.Clear(); + _impl_.axis_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Node::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 1, 33, 2> Node::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Node_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::index_tree::Node>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string axis = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.axis_)}}, + // repeated string value = 2; + {::_pbi::TcParser::FastUR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.value_)}}, + // repeated int64 indexes = 3; + {::_pbi::TcParser::FastV64P1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.indexes_)}}, + // repeated double result = 4; + {::_pbi::TcParser::FastF64P1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.result_)}}, + // repeated int64 size_result = 5; + {::_pbi::TcParser::FastV64P1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.size_result_)}}, + // repeated .index_tree.Node children = 6; + {::_pbi::TcParser::FastMtR1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(Node, _impl_.children_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string axis = 1; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.axis_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated string value = 2; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.value_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // repeated int64 indexes = 3; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.indexes_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // repeated double result = 4; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.result_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, + // repeated int64 size_result = 5; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.size_result_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // repeated .index_tree.Node children = 6; + {PROTOBUF_FIELD_OFFSET(Node, _impl_.children_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::index_tree::Node>()}, + }}, {{ + "\17\4\5\0\0\0\0\0" + "index_tree.Node" + "axis" + "value" + }}, +}; + +::uint8_t* Node::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:index_tree.Node) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string axis = 1; + if (!this->_internal_axis().empty()) { + const std::string& _s = this->_internal_axis(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "index_tree.Node.axis"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated string value = 2; + for (int i = 0, n = this->_internal_value_size(); i < n; ++i) { + const auto& s = this->_internal_value().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "index_tree.Node.value"); + target = stream->WriteString(2, s, target); + } + + // repeated int64 indexes = 3; + { + int byte_size = _impl_._indexes_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 3, _internal_indexes(), byte_size, target); + } + } + + // repeated double result = 4; + if (this->_internal_result_size() > 0) { + target = stream->WriteFixedPacked(4, _internal_result(), target); + } + + // repeated int64 size_result = 5; + { + int byte_size = _impl_._size_result_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 5, _internal_size_result(), byte_size, target); + } + } + + // repeated .index_tree.Node children = 6; + for (unsigned i = 0, n = static_cast( + this->_internal_children_size()); + i < n; i++) { + const auto& repfield = this->_internal_children().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:index_tree.Node) + return target; +} + +::size_t Node::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:index_tree.Node) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string value = 2; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_value().size()); + for (int i = 0, n = _internal_value().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_value().Get(i)); + } + // repeated int64 indexes = 3; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_indexes()) + ; + _impl_._indexes_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated double result = 4; + { + std::size_t data_size = std::size_t{8} * + ::_pbi::FromIntSize(this->_internal_result_size()) + ; + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated int64 size_result = 5; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_size_result()) + ; + _impl_._size_result_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated .index_tree.Node children = 6; + total_size += 1UL * this->_internal_children_size(); + for (const auto& msg : this->_internal_children()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // string axis = 1; + if (!this->_internal_axis().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_axis()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Node::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:index_tree.Node) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_value()->MergeFrom(from._internal_value()); + _this->_internal_mutable_indexes()->MergeFrom(from._internal_indexes()); + _this->_internal_mutable_result()->MergeFrom(from._internal_result()); + _this->_internal_mutable_size_result()->MergeFrom(from._internal_size_result()); + _this->_internal_mutable_children()->MergeFrom( + from._internal_children()); + if (!from._internal_axis().empty()) { + _this->_internal_set_axis(from._internal_axis()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Node::CopyFrom(const Node& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:index_tree.Node) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool Node::IsInitialized() const { + return true; +} + +void Node::InternalSwap(Node* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.value_.InternalSwap(&other->_impl_.value_); + _impl_.indexes_.InternalSwap(&other->_impl_.indexes_); + _impl_.result_.InternalSwap(&other->_impl_.result_); + _impl_.size_result_.InternalSwap(&other->_impl_.size_result_); + _impl_.children_.InternalSwap(&other->_impl_.children_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.axis_, &other->_impl_.axis_, arena); +} + +::google::protobuf::Metadata Node::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto_getter, + &descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto_once, + file_level_metadata_src_2fgribjump_2ftools_2findex_5ftree_2eproto[0]); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace index_tree +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/src/gribjump/tools/src/gribjump/tools/index_tree.pb.h b/src/gribjump/tools/src/gribjump/tools/index_tree.pb.h new file mode 100644 index 0000000..cd6b7a9 --- /dev/null +++ b/src/gribjump/tools/src/gribjump/tools/index_tree.pb.h @@ -0,0 +1,716 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/gribjump/tools/index_tree.proto +// Protobuf C++ Version: 5.26.1 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_src_2fgribjump_2ftools_2findex_5ftree_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_src_2fgribjump_2ftools_2findex_5ftree_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_src_2fgribjump_2ftools_2findex_5ftree_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_src_2fgribjump_2ftools_2findex_5ftree_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_src_2fgribjump_2ftools_2findex_5ftree_2eproto; +namespace index_tree { +class Node; +struct NodeDefaultTypeInternal; +extern NodeDefaultTypeInternal _Node_default_instance_; +} // namespace index_tree +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace index_tree { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Node final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:index_tree.Node) */ { + public: + inline Node() : Node(nullptr) {} + ~Node() override; + template + explicit PROTOBUF_CONSTEXPR Node( + ::google::protobuf::internal::ConstantInitialized); + + inline Node(const Node& from) : Node(nullptr, from) {} + inline Node(Node&& from) noexcept + : Node(nullptr, std::move(from)) {} + inline Node& operator=(const Node& from) { + CopyFrom(from); + return *this; + } + inline Node& operator=(Node&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Node& default_instance() { + return *internal_default_instance(); + } + static inline const Node* internal_default_instance() { + return reinterpret_cast( + &_Node_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Node& a, Node& b) { a.Swap(&b); } + inline void Swap(Node* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Node* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Node* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Node& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Node& from) { Node::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Node* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "index_tree.Node"; } + + protected: + explicit Node(::google::protobuf::Arena* arena); + Node(::google::protobuf::Arena* arena, const Node& from); + Node(::google::protobuf::Arena* arena, Node&& from) noexcept + : Node(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 2, + kIndexesFieldNumber = 3, + kResultFieldNumber = 4, + kSizeResultFieldNumber = 5, + kChildrenFieldNumber = 6, + kAxisFieldNumber = 1, + }; + // repeated string value = 2; + int value_size() const; + private: + int _internal_value_size() const; + + public: + void clear_value() ; + const std::string& value(int index) const; + std::string* mutable_value(int index); + void set_value(int index, const std::string& value); + void set_value(int index, std::string&& value); + void set_value(int index, const char* value); + void set_value(int index, const char* value, std::size_t size); + void set_value(int index, absl::string_view value); + std::string* add_value(); + void add_value(const std::string& value); + void add_value(std::string&& value); + void add_value(const char* value); + void add_value(const char* value, std::size_t size); + void add_value(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& value() const; + ::google::protobuf::RepeatedPtrField* mutable_value(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_value() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_value(); + + public: + // repeated int64 indexes = 3; + int indexes_size() const; + private: + int _internal_indexes_size() const; + + public: + void clear_indexes() ; + ::int64_t indexes(int index) const; + void set_indexes(int index, ::int64_t value); + void add_indexes(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& indexes() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_indexes(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_indexes() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_indexes(); + + public: + // repeated double result = 4; + int result_size() const; + private: + int _internal_result_size() const; + + public: + void clear_result() ; + double result(int index) const; + void set_result(int index, double value); + void add_result(double value); + const ::google::protobuf::RepeatedField& result() const; + ::google::protobuf::RepeatedField* mutable_result(); + + private: + const ::google::protobuf::RepeatedField& _internal_result() const; + ::google::protobuf::RepeatedField* _internal_mutable_result(); + + public: + // repeated int64 size_result = 5; + int size_result_size() const; + private: + int _internal_size_result_size() const; + + public: + void clear_size_result() ; + ::int64_t size_result(int index) const; + void set_size_result(int index, ::int64_t value); + void add_size_result(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& size_result() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_size_result(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_size_result() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_size_result(); + + public: + // repeated .index_tree.Node children = 6; + int children_size() const; + private: + int _internal_children_size() const; + + public: + void clear_children() ; + ::index_tree::Node* mutable_children(int index); + ::google::protobuf::RepeatedPtrField<::index_tree::Node>* mutable_children(); + + private: + const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& _internal_children() const; + ::google::protobuf::RepeatedPtrField<::index_tree::Node>* _internal_mutable_children(); + public: + const ::index_tree::Node& children(int index) const; + ::index_tree::Node* add_children(); + const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& children() const; + // string axis = 1; + void clear_axis() ; + const std::string& axis() const; + template + void set_axis(Arg_&& arg, Args_... args); + std::string* mutable_axis(); + PROTOBUF_NODISCARD std::string* release_axis(); + void set_allocated_axis(std::string* value); + + private: + const std::string& _internal_axis() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_axis( + const std::string& value); + std::string* _internal_mutable_axis(); + + public: + // @@protoc_insertion_point(class_scope:index_tree.Node) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 6, 1, + 33, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField value_; + ::google::protobuf::RepeatedField<::int64_t> indexes_; + mutable ::google::protobuf::internal::CachedSize _indexes_cached_byte_size_; + ::google::protobuf::RepeatedField result_; + ::google::protobuf::RepeatedField<::int64_t> size_result_; + mutable ::google::protobuf::internal::CachedSize _size_result_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::index_tree::Node > children_; + ::google::protobuf::internal::ArenaStringPtr axis_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_src_2fgribjump_2ftools_2findex_5ftree_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Node + +// string axis = 1; +inline void Node::clear_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.ClearToEmpty(); +} +inline const std::string& Node::axis() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.axis) + return _internal_axis(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Node::set_axis(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:index_tree.Node.axis) +} +inline std::string* Node::mutable_axis() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_axis(); + // @@protoc_insertion_point(field_mutable:index_tree.Node.axis) + return _s; +} +inline const std::string& Node::_internal_axis() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.axis_.Get(); +} +inline void Node::_internal_set_axis(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.Set(value, GetArena()); +} +inline std::string* Node::_internal_mutable_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _impl_.axis_.Mutable( GetArena()); +} +inline std::string* Node::release_axis() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:index_tree.Node.axis) + return _impl_.axis_.Release(); +} +inline void Node::set_allocated_axis(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.axis_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.axis_.IsDefault()) { + _impl_.axis_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:index_tree.Node.axis) +} + +// repeated string value = 2; +inline int Node::_internal_value_size() const { + return _internal_value().size(); +} +inline int Node::value_size() const { + return _internal_value_size(); +} +inline void Node::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.Clear(); +} +inline std::string* Node::add_value() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_value()->Add(); + // @@protoc_insertion_point(field_add_mutable:index_tree.Node.value) + return _s; +} +inline const std::string& Node::value(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.value) + return _internal_value().Get(index); +} +inline std::string* Node::mutable_value(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:index_tree.Node.value) + return _internal_mutable_value()->Mutable(index); +} +inline void Node::set_value(int index, const std::string& value) { + _internal_mutable_value()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:index_tree.Node.value) +} +inline void Node::set_value(int index, std::string&& value) { + _internal_mutable_value()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:index_tree.Node.value) +} +inline void Node::set_value(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_value()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:index_tree.Node.value) +} +inline void Node::set_value(int index, const char* value, + std::size_t size) { + _internal_mutable_value()->Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:index_tree.Node.value) +} +inline void Node::set_value(int index, absl::string_view value) { + _internal_mutable_value()->Mutable(index)->assign( + value.data(), value.size()); + // @@protoc_insertion_point(field_set_string_piece:index_tree.Node.value) +} +inline void Node::add_value(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value); + // @@protoc_insertion_point(field_add:index_tree.Node.value) +} +inline void Node::add_value(std::string&& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:index_tree.Node.value) +} +inline void Node::add_value(const char* value) { + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:index_tree.Node.value) +} +inline void Node::add_value(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:index_tree.Node.value) +} +inline void Node::add_value(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_value()->Add()->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_add_string_piece:index_tree.Node.value) +} +inline const ::google::protobuf::RepeatedPtrField& +Node::value() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.value) + return _internal_value(); +} +inline ::google::protobuf::RepeatedPtrField* +Node::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.value) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_value(); +} +inline const ::google::protobuf::RepeatedPtrField& +Node::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.value_; +} +inline ::google::protobuf::RepeatedPtrField* +Node::_internal_mutable_value() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.value_; +} + +// repeated int64 indexes = 3; +inline int Node::_internal_indexes_size() const { + return _internal_indexes().size(); +} +inline int Node::indexes_size() const { + return _internal_indexes_size(); +} +inline void Node::clear_indexes() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.indexes_.Clear(); +} +inline ::int64_t Node::indexes(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.indexes) + return _internal_indexes().Get(index); +} +inline void Node::set_indexes(int index, ::int64_t value) { + _internal_mutable_indexes()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.indexes) +} +inline void Node::add_indexes(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_indexes()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.indexes) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Node::indexes() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.indexes) + return _internal_indexes(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::mutable_indexes() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.indexes) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_indexes(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Node::_internal_indexes() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.indexes_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::_internal_mutable_indexes() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.indexes_; +} + +// repeated double result = 4; +inline int Node::_internal_result_size() const { + return _internal_result().size(); +} +inline int Node::result_size() const { + return _internal_result_size(); +} +inline void Node::clear_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.result_.Clear(); +} +inline double Node::result(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.result) + return _internal_result().Get(index); +} +inline void Node::set_result(int index, double value) { + _internal_mutable_result()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.result) +} +inline void Node::add_result(double value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_result()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.result) +} +inline const ::google::protobuf::RepeatedField& Node::result() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.result) + return _internal_result(); +} +inline ::google::protobuf::RepeatedField* Node::mutable_result() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.result) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_result(); +} +inline const ::google::protobuf::RepeatedField& +Node::_internal_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.result_; +} +inline ::google::protobuf::RepeatedField* Node::_internal_mutable_result() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.result_; +} + +// repeated int64 size_result = 5; +inline int Node::_internal_size_result_size() const { + return _internal_size_result().size(); +} +inline int Node::size_result_size() const { + return _internal_size_result_size(); +} +inline void Node::clear_size_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.size_result_.Clear(); +} +inline ::int64_t Node::size_result(int index) const { + // @@protoc_insertion_point(field_get:index_tree.Node.size_result) + return _internal_size_result().Get(index); +} +inline void Node::set_size_result(int index, ::int64_t value) { + _internal_mutable_size_result()->Set(index, value); + // @@protoc_insertion_point(field_set:index_tree.Node.size_result) +} +inline void Node::add_size_result(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_size_result()->Add(value); + // @@protoc_insertion_point(field_add:index_tree.Node.size_result) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Node::size_result() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.size_result) + return _internal_size_result(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::mutable_size_result() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.size_result) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_size_result(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Node::_internal_size_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.size_result_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Node::_internal_mutable_size_result() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.size_result_; +} + +// repeated .index_tree.Node children = 6; +inline int Node::_internal_children_size() const { + return _internal_children().size(); +} +inline int Node::children_size() const { + return _internal_children_size(); +} +inline void Node::clear_children() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.children_.Clear(); +} +inline ::index_tree::Node* Node::mutable_children(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:index_tree.Node.children) + return _internal_mutable_children()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::index_tree::Node>* Node::mutable_children() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:index_tree.Node.children) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_children(); +} +inline const ::index_tree::Node& Node::children(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:index_tree.Node.children) + return _internal_children().Get(index); +} +inline ::index_tree::Node* Node::add_children() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::index_tree::Node* _add = _internal_mutable_children()->Add(); + // @@protoc_insertion_point(field_add:index_tree.Node.children) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& Node::children() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:index_tree.Node.children) + return _internal_children(); +} +inline const ::google::protobuf::RepeatedPtrField<::index_tree::Node>& +Node::_internal_children() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.children_; +} +inline ::google::protobuf::RepeatedPtrField<::index_tree::Node>* +Node::_internal_mutable_children() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.children_; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace index_tree + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_src_2fgribjump_2ftools_2findex_5ftree_2eproto_2epb_2eh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0e1eb98..ae920b7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -60,3 +60,22 @@ ecbuild_add_test( TARGET "gribjump_test_O1280" TEST_DEPENDS gribjump_test_O1280_data_files NO_AS_NEEDED LIBS gribjump) + +ecbuild_add_test( TARGET "gribjump_test_compressed_tree" + SOURCES "test_compressed_tree.cc" + INCLUDES "${ECKIT_INCLUDE_DIRS}" + ENVIRONMENT "${gribjump_env}" + # TEST_DEPENDS gribjump_test_O1280_data_files + NO_AS_NEEDED + LIBS gribjump) + +ecbuild_add_test( TARGET "gribjump_test_protobuf_encoding" + SOURCES "test_protobuf_encoding.cc" + INCLUDES "${ECKIT_INCLUDE_DIRS}" + ENVIRONMENT "${gribjump_env}" + # TEST_DEPENDS gribjump_test_data_files + NO_AS_NEEDED + LIBS gribjump + ) + + diff --git a/tests/test_compressed_tree.cc b/tests/test_compressed_tree.cc new file mode 100644 index 0000000..cc8811a --- /dev/null +++ b/tests/test_compressed_tree.cc @@ -0,0 +1,144 @@ +#include +#include +#include "eckit/testing/Test.h" +#include +using namespace eckit::testing; +#include "gribjump/tools/CompressedRequestTree.h" + +using namespace std; + +namespace gribjump +{ + namespace test + { + CASE("test_tree_init") + { + string axis1 = "grandchild1"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *grandchild2 = new CompressedRequestTree(); + const string grandchild1_axis = (*grandchild1)._axis; + EXPECT((*grandchild2)._axis == "root"); + EXPECT((*grandchild1)._axis == "grandchild1"); + EXPECT(axis1 == "grandchild1"); + delete grandchild1; + delete grandchild2; + } + + CASE("test_parent") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + child1->add_child(grandchild1); + CompressedRequestTree *grandchild1_parent = (*grandchild1)._parent; + EXPECT((*grandchild1_parent)._axis == "child1"); + delete grandchild1, child1; + } + + CASE("test_set_parent") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + grandchild1->set_parent(child1); + EXPECT(((*(*grandchild1)._parent))._axis == "child1"); + } + + CASE("test_add_child") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + string axis3 = "child2"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + CompressedRequestTree *child2 = new CompressedRequestTree(axis3); + CompressedRequestTree *root_node = new CompressedRequestTree(); + root_node->add_child(child1); + root_node->add_child(child2); + child1->add_child(grandchild1); + vector children_multiset; + children_multiset.push_back(grandchild1); + EXPECT((*child1)._children == children_multiset); + delete grandchild1; + delete child1; + delete child2; + delete root_node; + } + + CASE("test_iterate_tree") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + string axis3 = "child2"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + CompressedRequestTree *child2 = new CompressedRequestTree(axis3); + CompressedRequestTree *root_node = new CompressedRequestTree(); + root_node->add_child(child1); + root_node->add_child(child2); + child1->add_child(grandchild1); + + auto print_path = [](typename Iterator::value_type path) + { + cout << "{"; + while (!path.empty()) + { + cout << path.back()->_axis << ", "; + path.pop_back(); + } + cout << "}" << endl; + }; + + for (auto &path : *root_node) + { + print_path(path); + } + + delete grandchild1; + delete child1; + delete child2; + delete root_node; + } + + CASE("test_create_child") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + child1->create_child(axis1, {"0"}); + EXPECT((*child1)._children.size() == 1); + for (CompressedRequestTree *c : (*child1)._children) + { + EXPECT((*c)._axis == "grandchild1"); + } + delete child1; + } + + CASE("test_repr") + { + string axis1 = "child1"; + CompressedRequestTree *child1 = new CompressedRequestTree(axis1); + child1->_values = {"0"}; + cout << *child1 << endl; + delete child1; + } + + CASE("test_pprint") + { + string axis1 = "child1"; + CompressedRequestTree *root = new CompressedRequestTree(); + CompressedRequestTree *child1 = new CompressedRequestTree(axis1); + child1->_values = {"0"}; + root->add_child(child1); + root->pprint(); + delete root, child1; + } + } +} + +int main(int argc, char **argv) +{ + return run_tests(argc, argv); +} \ No newline at end of file diff --git a/tests/test_compression.cc b/tests/test_compression.cc index e7c77f0..a04ec7c 100644 --- a/tests/test_compression.cc +++ b/tests/test_compression.cc @@ -21,128 +21,133 @@ using namespace eckit::testing; #include "data.cc" -namespace gribjump { -namespace test { - - -void print_result(const Interval& interval, const std::vector>& mask, const Values& actual, const Values& expected) +namespace gribjump { - auto [start, end] = interval; - auto size = end - start; - - std::cerr << "interval: " << "[" << start << "-" << end << "]" << std::endl; - - std::cerr << "mask (" << mask.size() << "): "; - for (size_t i = 0; i < mask.size(); i++) - std::cerr << mask[i] << ", "; - std::cerr << std::endl; - - std::cerr << "actual: "; - for (size_t i = 0; i < actual.size(); i++) - std::cerr << actual[i] << ", "; - std::cerr << std::endl; - - std::cerr << "expected: "; - for (size_t i = 0; i < actual.size(); i++) - std::cerr << expected[start + i] << ", "; - std::cerr << std::endl; -} - - -void test_compression() { - // TODO(maee): Use expected string in these tests - - for (const auto& data : testData) { - std::cerr << "Testing " << data.gribFileName << std::endl; - JumpHandle dataSource(data.gribFileName); - eckit::PathName binName = "temp"; - std::vector infos = dataSource.extractInfoFromFile(); - - JumpInfo gribInfo = *infos.back(); - EXPECT(gribInfo.ready()); - size_t numberOfDataPoints = gribInfo.getNumberOfDataPoints(); - - if (numberOfDataPoints != data.expectedData.size()) { - std::cerr << "numberOfDataPoints: " << numberOfDataPoints << std::endl; - std::cerr << "expectedData.size(): " << data.expectedData.size() << std::endl; - std::cerr << "numberOfDataPoints != data.expectedData.size()" << std::endl; - std::cerr << "Skipping test" << std::endl; - throw std::runtime_error("numberOfDataPoints != data.expectedData.size()"); + namespace test + { + + void print_result(const Interval &interval, const std::vector> &mask, const Values &actual, const Values &expected) + { + auto [start, end] = interval; + auto size = end - start; + + std::cerr << "interval: " + << "[" << start << "-" << end << "]" << std::endl; + + std::cerr << "mask (" << mask.size() << "): "; + for (size_t i = 0; i < mask.size(); i++) + std::cerr << mask[i] << ", "; + std::cerr << std::endl; + + std::cerr << "actual: "; + for (size_t i = 0; i < actual.size(); i++) + std::cerr << actual[i] << ", "; + std::cerr << std::endl; + + std::cerr << "expected: "; + for (size_t i = 0; i < actual.size(); i++) + std::cerr << expected[start + i] << ", "; + std::cerr << std::endl; } - EXPECT(numberOfDataPoints == data.expectedData.size()); - - std::vector all_intervals = { - std::make_pair(0, 30), - std::make_pair(31, 60), - std::make_pair(60, 66), - std::make_pair(91, 120), - std::make_pair(200, 400), - std::make_pair(401, 402), - std::make_pair(403, 600), - }; - - std::vector intervals; - std::copy_if(all_intervals.begin(), all_intervals.end(), std::back_inserter(intervals), [&](const auto& interval) { - return interval.second <= numberOfDataPoints && interval.first < interval.second; - }); - - std::unique_ptr result(gribInfo.extractRanges(dataSource, intervals)); - auto actual_all = result->values(); - auto mask_all = result->mask(); - - const auto expected = data.expectedData; - - for (size_t index = 0; index < intervals.size(); index++) { - // Compare mask if it exists - if (!mask_all.empty()) { - auto actual_mask = mask_all[index]; - Bitmap expected_bitmap = generate_bitmap(expected, intervals[index]); - auto expected_mask = to_bitset(expected_bitmap); - //print_bitmap(expected_bitmap); - //print_mask(expected_mask); - //print_mask(actual_mask); - EXPECT(actual_mask == expected_mask); - } - // Compare values - auto [start, end] = intervals[index]; - auto actual_values = actual_all[index]; - EXPECT(actual_values.size() == end - start); - for (size_t i = 0; i < actual_values.size(); i++) { - if (expected[start + i] == 9999) { - EXPECT(std::isnan(actual_values[i])); - continue; + void test_compression() + { + // TODO(maee): Use expected string in these tests + + for (const auto &data : testData) + { + std::cerr << "Testing " << data.gribFileName << std::endl; + JumpHandle dataSource(data.gribFileName); + eckit::PathName binName = "temp"; + std::vector infos = dataSource.extractInfoFromFile(); + + JumpInfo gribInfo = *infos.back(); + EXPECT(gribInfo.ready()); + size_t numberOfDataPoints = gribInfo.getNumberOfDataPoints(); + + if (numberOfDataPoints != data.expectedData.size()) + { + std::cerr << "numberOfDataPoints: " << numberOfDataPoints << std::endl; + std::cerr << "expectedData.size(): " << data.expectedData.size() << std::endl; + std::cerr << "numberOfDataPoints != data.expectedData.size()" << std::endl; + std::cerr << "Skipping test" << std::endl; + throw std::runtime_error("numberOfDataPoints != data.expectedData.size()"); } - - if (actual_values[i] != expected[start + i]){ - std::cerr << "actual: " << actual_values[i] << std::endl; - std::cerr << "expected: " << expected[start + i] << std::endl; - print_result(intervals[index], {}, actual_values, expected); - throw std::runtime_error("actual value does not match expected value"); + EXPECT(numberOfDataPoints == data.expectedData.size()); + + std::vector all_intervals = { + std::make_pair(0, 30), + std::make_pair(31, 60), + std::make_pair(60, 66), + std::make_pair(91, 120), + std::make_pair(200, 400), + std::make_pair(401, 402), + std::make_pair(403, 600), + }; + + std::vector intervals; + std::copy_if(all_intervals.begin(), all_intervals.end(), std::back_inserter(intervals), [&](const auto &interval) + { return interval.second <= numberOfDataPoints && interval.first < interval.second; }); + + std::unique_ptr result(gribInfo.extractRanges(dataSource, intervals)); + auto actual_all = result->values(); + auto mask_all = result->mask(); + + const auto expected = data.expectedData; + + for (size_t index = 0; index < intervals.size(); index++) + { + // Compare mask if it exists + if (!mask_all.empty()) + { + auto actual_mask = mask_all[index]; + Bitmap expected_bitmap = generate_bitmap(expected, intervals[index]); + auto expected_mask = to_bitset(expected_bitmap); + // print_bitmap(expected_bitmap); + // print_mask(expected_mask); + // print_mask(actual_mask); + EXPECT(actual_mask == expected_mask); + } + + // Compare values + auto [start, end] = intervals[index]; + auto actual_values = actual_all[index]; + EXPECT(actual_values.size() == end - start); + for (size_t i = 0; i < actual_values.size(); i++) + { + if (expected[start + i] == 9999) + { + EXPECT(std::isnan(actual_values[i])); + continue; + } + + if (actual_values[i] != expected[start + i]) + { + std::cerr << "actual: " << actual_values[i] << std::endl; + std::cerr << "expected: " << expected[start + i] << std::endl; + print_result(intervals[index], {}, actual_values, expected); + throw std::runtime_error("actual value does not match expected value"); + } + + EXPECT(actual_values[i] == expected[start + i]); + } } - - EXPECT(actual_values[i] == expected[start + i]); - } } - } -} + CASE("test_compression") + { + setGribJumpData(); // Set the data used by the test cases -CASE( "test_compression" ) { - setGribJumpData(); // Set the data used by the test cases - - test_compression(); -} - - -//----------------------------------------------------------------------------- + test_compression(); + } + //----------------------------------------------------------------------------- -} // namespace test + } // namespace test } // namespace gribjump int main(int argc, char **argv) { - return run_tests ( argc, argv ); + return run_tests(argc, argv); } diff --git a/tests/test_protobuf_encoding.cc b/tests/test_protobuf_encoding.cc new file mode 100644 index 0000000..6dcfc65 --- /dev/null +++ b/tests/test_protobuf_encoding.cc @@ -0,0 +1,97 @@ +#include +#include +#include "eckit/testing/Test.h" +// #include +#include "gribjump/tools/TreeEncodings.h" + +using namespace eckit::testing; +using namespace std; + +namespace gribjump +{ + namespace test + { + CASE("test_encoding_decoding") + { + string axis1 = "grandchild1"; + string axis2 = "child1"; + string axis3 = "child2"; + CompressedRequestTree *grandchild1 = new CompressedRequestTree(axis1); + CompressedRequestTree *child1 = new CompressedRequestTree(axis2); + CompressedRequestTree *child2 = new CompressedRequestTree(axis3); + CompressedRequestTree *root_node = new CompressedRequestTree(); + root_node->add_child(child1); + root_node->add_child(child2); + child1->add_child(grandchild1); + + string *encoded_tree = encode(*root_node); + + CompressedRequestTree *decoded_tree = decode(encoded_tree); + + CompressedRequestTree *decoded_child1 = *(decoded_tree->_children.begin()); + + EXPECT((root_node->_children).size() == decoded_tree->_children.size()); + EXPECT(decoded_tree->_children.size() == 2); + + if (decoded_child1->get_axis() == "child1") + { + EXPECT((*decoded_child1)._children.size() == 1); + CompressedRequestTree *decoded_grandchild1 = *(decoded_child1->_children.begin()); + EXPECT(decoded_grandchild1->get_axis() == "grandchild1"); + } + else + { + auto iter = decoded_tree->_children.cbegin(); + advance(iter, 1); + CompressedRequestTree *decoded_child2 = *iter; + EXPECT(decoded_child2->get_axis() == "child1"); + CompressedRequestTree *decoded_grandchild = *(decoded_child2->_children.begin()); + EXPECT(decoded_grandchild->get_axis() == "grandchild1"); + } + delete grandchild1; + delete child1; + delete child2; + delete root_node; + } + + CASE("test_real_tree_decoding") + { + string tree_byte_array = "\n\x04root2\xd4\x02\n\x05" + "class\x12\x02od*\x01\x01" + "2\xc3\x02\n\x04" + "date\x12\x08" + "20230625*\x02\x01\x01" + "2\xac\x02\n\x04time\x12\x04" + "1200*\x03\x01\x01\x01" + "2\x98\x02\n\x06" + "domain\x12\x01g*\x04\x01\x01\x01\x01" + "2\x84\x02\n\x06" + "expver" + "\x12\x04" + "0001*\x05\x01\x01\x01\x01\x01" + "2\xec\x01\n\x07levtype\x12\x03sfc*\x06\x01\x01\x01\x01\x01\x01" + "2\xd3\x01\n\x05param\x12\x03" + "167*\x07\x01\x01\x01\x01\x01\x01\x01" + "2\xbb\x01\n\x04step\x12\x01" + "0*\x08\x01\x01\x01\x01\x01\x01\x01\x01" + "2\xa5\x01\n\x06stream\x12\x04oper*\t\x01\x01\x01\x01\x01\x01\x01\x01\x01" + "2\x89\x01\n\x04type\x12\x02" + "an\x1al\xf0\x8b\xc9\x01\xf1\x8b\xc9\x01\xf2\x8b\xc9\x01\xe4\xe3\xc8\x01\xe5\xe3\xc8\x01\xe6\xe3\xc8\x01\xdc\xbb\xc8\x01\xdd\xbb\xc8\x01\xde\xbb\xc8\x01\xf0\x8b\xc9\x01\xf1\x8b\xc9\x01\xf2\x8b\xc9\x01\xe4\xe3\xc8\x01\xe5\xe3\xc8\x01\xe6\xe3\xc8\x01\xdc\xbb\xc8\x01\xdd\xbb\xc8\x01\xde\xbb\xc8\x01\xf0\x8b\xc9\x01\xf1\x8b\xc9\x01\xf2\x8b\xc9\x01\xe4\xe3\xc8\x01\xe5\xe3\xc8\x01\xe6\xe3\xc8\x01\xdc\xbb\xc8\x01\xdd\xbb\xc8\x01\xde\xbb\xc8\x01*\n\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01:\x03\x03\x03\x03"; + + string *encoded_tree = &tree_byte_array; + + CompressedRequestTree *decoded_tree = decode(encoded_tree); + + CompressedRequestTree *decoded_child1 = *(decoded_tree->_children.begin()); + + decoded_child1->_parent->pprint(); + + EXPECT(1 == 1); + } + } +} + +int main(int argc, char **argv) +{ + return run_tests(argc, argv); +} \ No newline at end of file