IPPInfo ======= .. cpp:class:: numpy::IPPInfo Configuration and system information class. Example ------- .. code-block:: cpp #include using namespace numpy; // Use IPPInfo IPPInfo obj; // ... operations ... Indexing / Selection -------------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``std::string get_build_info()`` - std::string - NP_IPP_CONFIG.H:133 - * - ``std::string get_supported_types()`` - std::string - NP_IPP_CONFIG.H:156 - * - ``std::string get_version()`` - std::string - NP_IPP_CONFIG.H:109 - :ref:`View ` Type Checking ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``bool is_compiled_with_ipp()`` - bool - NP_IPP_CONFIG.H:67 - :ref:`View ` * - ``bool is_runtime_available()`` - bool - NP_IPP_CONFIG.H:74 - :ref:`View ` Other Methods ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``void print_status()`` - void - NP_IPP_CONFIG.H:169 - :ref:`View ` Code Examples ------------- The following examples are extracted from the test suite. .. _example-ippinfo-get_version-0: .. dropdown:: get_version (np_test_1_all.cpp:25337) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 25327 :emphasize-lines: 11 // Test compile-time detection bool compiled_with_boost = numpy::boost_lib::BoostInfo::is_compiled_with_boost(); // std::cout << "Compiled with Boost: " << (compiled_with_boost ? "Yes" : "No") << std::endl; // Test runtime availability bool runtime_available = numpy::boost_lib::BoostInfo::is_runtime_available(); // std::cout << "Runtime available: " << (runtime_available ? "Yes" : "No") << std::endl; // Test version string std::string version = numpy::boost_lib::BoostInfo::get_version(); // std::cout << "Version: " << version << std::endl; // Verify version contains "Boost" when enabled if (compiled_with_boost) { if (version.find("Boost") == std::string::npos) { throw std::runtime_error("Version string should contain 'Boost' when enabled"); } // std::cout << "[OK] Version string contains 'Boost'" << std::endl; } else { .. _example-ippinfo-is_compiled_with_ipp-1: .. dropdown:: is_compiled_with_ipp (np_test_2_all.cpp:7923) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 7913 :emphasize-lines: 11 private: std::mt19937 gen; public: IPPSortingTests() : gen(std::random_device{}()) {} // Test IPP configuration and detection (informational only - no validation tests) void test_ipp_config() { std::cout << "========= IPP Configuration Test ======================="; // std::cout << "IPP compiled: " << (numpy::ipp::IPPInfo::is_compiled_with_ipp() ? "Yes" : "No") << std::endl; // std::cout << "IPP runtime available: " << (numpy::ipp::IPPInfo::is_runtime_available() ? "Yes" : "No") << std::endl; // std::cout << "IPP version: " << numpy::ipp::IPPInfo::get_version() << std::endl; if (numpy::ipp::IPPInfo::is_runtime_available()) { numpy::ipp::IPPInfo::print_status(); } // Note: This function is informational only and doesn't throw exceptions // IPP availability is properly tested in other test functions // std::cout << std::endl; .. _example-ippinfo-is_runtime_available-2: .. dropdown:: is_runtime_available (np_test_1_all.cpp:25333) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 25323 :emphasize-lines: 11 // Helper functions for testing void test_boost_info() { std::cout << "========= Testing BoostInfo ======================"; // Test compile-time detection bool compiled_with_boost = numpy::boost_lib::BoostInfo::is_compiled_with_boost(); // std::cout << "Compiled with Boost: " << (compiled_with_boost ? "Yes" : "No") << std::endl; // Test runtime availability bool runtime_available = numpy::boost_lib::BoostInfo::is_runtime_available(); // std::cout << "Runtime available: " << (runtime_available ? "Yes" : "No") << std::endl; // Test version string std::string version = numpy::boost_lib::BoostInfo::get_version(); // std::cout << "Version: " << version << std::endl; // Verify version contains "Boost" when enabled if (compiled_with_boost) { if (version.find("Boost") == std::string::npos) { throw std::runtime_error("Version string should contain 'Boost' when enabled"); .. _example-ippinfo-print_status-3: .. dropdown:: print_status (np_test_1_all.cpp:25356) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 25346 :emphasize-lines: 11 } else { if (version != "Boost not compiled in") { throw std::runtime_error("Version string incorrect when Boost not enabled"); } // std::cout << "[OK] Boost not compiled message correct" << std::endl; } // Test print_status // std::cout << "Boost status:" << std::endl; numpy::boost_lib::BoostInfo::print_status(); // std::cout << "[OK] BoostInfo tests passed" << std::endl; } void test_boost_config() { std::cout << "========= Testing BoostConfig ==================="; using namespace numpy::boost_lib; // Test default backend