.. _program_listing_file_include_eigenpy_fwd.hpp: Program Listing for File fwd.hpp ================================ |exhale_lsh| :ref:`Return to documentation for file ` (``include/eigenpy/fwd.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2014-2024 CNRS INRIA */ #ifndef __eigenpy_fwd_hpp__ #define __eigenpy_fwd_hpp__ #if defined(__clang__) #define EIGENPY_CLANG_COMPILER #elif defined(__GNUC__) #define EIGENPY_GCC_COMPILER #elif defined(_MSC_VER) #define EIGENPY_MSVC_COMPILER #endif #if (__cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703)) #define EIGENPY_WITH_CXX17_SUPPORT #endif #if (__cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201403)) #define EIGENPY_WITH_CXX14_SUPPORT #endif #if (__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define EIGENPY_WITH_CXX11_SUPPORT #endif #define EIGENPY_STRING_LITERAL(string) #string #define EIGENPY_STRINGIZE(string) EIGENPY_STRING_LITERAL(string) #define _EIGENPY_PPCAT(A, B) A##B #define EIGENPY_PPCAT(A, B) _EIGENPY_PPCAT(A, B) #define EIGENPY_STRINGCAT(A, B) A B // For more details, visit // https://stackoverflow.com/questions/171435/portability-of-warning-preprocessor-directive #if defined(EIGENPY_CLANG_COMPILER) || defined(EIGENPY_GCC_COMPILER) #define EIGENPY_PRAGMA(x) _Pragma(#x) #define EIGENPY_PRAGMA_MESSAGE(the_message) \ EIGENPY_PRAGMA(GCC message the_message) #define EIGENPY_PRAGMA_WARNING(the_message) \ EIGENPY_PRAGMA(GCC warning the_message) #define EIGENPY_PRAGMA_DEPRECATED(the_message) \ EIGENPY_PRAGMA_WARNING(Deprecated : the_message) #define EIGENPY_PRAGMA_DEPRECATED_HEADER(old_header, new_header) \ EIGENPY_PRAGMA_WARNING( \ Deprecated header file : #old_header has been replaced \ by #new_header.\n Please use #new_header instead of #old_header.) #elif defined(WIN32) #define EIGENPY_PRAGMA(x) __pragma(#x) #define EIGENPY_PRAGMA_MESSAGE(the_message) \ EIGENPY_PRAGMA(message(#the_message)) #define EIGENPY_PRAGMA_WARNING(the_message) \ EIGENPY_PRAGMA(message(EIGENPY_STRINGCAT("WARNING: ", the_message))) #endif #define EIGENPY_DEPRECATED_MACRO(macro, the_message) \ EIGENPY_PRAGMA_WARNING( \ EIGENPY_STRINGCAT("this macro is deprecated: ", the_message)) #define EIGENPY_DEPRECATED_FILE(the_message) \ EIGENPY_PRAGMA_WARNING( \ EIGENPY_STRINGCAT("this file is deprecated: ", the_message)) #define EIGENPY_DOCUMENTATION_START_IGNORE #define EIGENPY_DOCUMENTATION_END_IGNORE #include "eigenpy/config.hpp" #include // Silence a warning about a deprecated use of boost bind by boost python // at least fo boost 1.73 to 1.75 // ref. https://github.com/stack-of-tasks/tsid/issues/128 #define BOOST_BIND_GLOBAL_PLACEHOLDERS #include #include #include #include namespace eigenpy { namespace bp = boost::python; } #define NO_IMPORT_ARRAY #include "eigenpy/numpy.hpp" #undef NO_IMPORT_ARRAY #undef BOOST_BIND_GLOBAL_PLACEHOLDERS #include #include #include #ifdef EIGENPY_WITH_CXX11_SUPPORT #include #define EIGENPY_WITH_TENSOR_SUPPORT #endif #if EIGEN_VERSION_AT_LEAST(3, 2, 90) #define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned16 #else #define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned #endif #define EIGENPY_DEFAULT_ALIGN_BYTES EIGEN_DEFAULT_ALIGN_BYTES #define EIGENPY_NO_ALIGNMENT_VALUE Eigen::Unaligned #define EIGENPY_UNUSED_VARIABLE(var) (void)(var) #define EIGENPY_UNUSED_TYPE(type) EIGENPY_UNUSED_VARIABLE((type *)(NULL)) #ifndef NDEBUG #define EIGENPY_USED_VARIABLE_ONLY_IN_DEBUG_MODE(var) #else #define EIGENPY_USED_VARIABLE_ONLY_IN_DEBUG_MODE(var) \ EIGENPY_UNUSED_VARIABLE(var) #endif #ifdef EIGENPY_WITH_CXX11_SUPPORT #include #define EIGENPY_SHARED_PTR_HOLDER_TYPE(T) ::std::shared_ptr #else #include #define EIGENPY_SHARED_PTR_HOLDER_TYPE(T) ::boost::shared_ptr #endif namespace eigenpy { // Default Scalar value can't be defined in the declaration // because of a CL bug. // See https://github.com/stack-of-tasks/eigenpy/pull/462 template struct EigenToPy; template struct EigenFromPy; template struct remove_const_reference { typedef typename boost::remove_const< typename boost::remove_reference::type>::type type; }; template struct get_eigen_base_type { typedef typename remove_const_reference::type EigenType_; typedef typename boost::mpl::if_< boost::is_base_of, EigenType_>, Eigen::MatrixBase, typename boost::mpl::if_< boost::is_base_of, EigenType_>, Eigen::SparseMatrixBase #ifdef EIGENPY_WITH_TENSOR_SUPPORT , typename boost::mpl::if_< boost::is_base_of, EigenType_>, Eigen::TensorBase, void>::type #else , void #endif >::type>::type _type; typedef typename boost::mpl::if_< boost::is_const::type>, const _type, _type>::type type; }; template struct get_eigen_plain_type; template struct get_eigen_plain_type> { typedef typename Eigen::internal::traits< Eigen::Ref>::PlainObjectType type; }; #ifdef EIGENPY_WITH_TENSOR_SUPPORT template struct get_eigen_plain_type> { typedef TensorType type; }; #endif namespace internal { template struct has_operator_equal_impl { template static auto check(U *) -> decltype(std::declval() == std::declval()); template static auto check(...) -> std::false_type; using type = typename std::is_same(0))>::type; }; } // namespace internal template struct has_operator_equal : internal::has_operator_equal_impl::type {}; namespace literals { inline boost::python::arg operator"" _a(const char *name, std::size_t) { return boost::python::arg(name); } } // namespace literals } // namespace eigenpy #include "eigenpy/alignment.hpp" #include "eigenpy/id.hpp" #endif // ifndef __eigenpy_fwd_hpp__