mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-30 00:32:01 +08:00
Macros: add MSVC paths, add an important comment on EIGEN_ALIGN_128
This commit is contained in:
parent
93f8d56789
commit
b27a3644a2
@ -101,8 +101,8 @@ class CwiseBinaryOp : ei_no_assignment_operator,
|
|||||||
// add together a float matrix and a double matrix.
|
// add together a float matrix and a double matrix.
|
||||||
EIGEN_STATIC_ASSERT((ei_is_same_type<typename Lhs::Scalar, typename Rhs::Scalar>::ret),
|
EIGEN_STATIC_ASSERT((ei_is_same_type<typename Lhs::Scalar, typename Rhs::Scalar>::ret),
|
||||||
you_mixed_different_numeric_types__you_need_to_use_the_cast_method_of_MatrixBase_to_cast_numeric_types_explicitly)
|
you_mixed_different_numeric_types__you_need_to_use_the_cast_method_of_MatrixBase_to_cast_numeric_types_explicitly)
|
||||||
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
|
|
||||||
// require the sizes to match
|
// require the sizes to match
|
||||||
|
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
|
||||||
ei_assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
ei_assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,22 +90,34 @@ using Eigen::ei_cos;
|
|||||||
// : function body not available
|
// : function body not available
|
||||||
#if EIGEN_GNUC_AT_LEAST(4,0)
|
#if EIGEN_GNUC_AT_LEAST(4,0)
|
||||||
#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
|
#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
|
||||||
|
#elif (defined _MSC_VER)
|
||||||
|
#define EIGEN_ALWAYS_INLINE __forceinline
|
||||||
#else
|
#else
|
||||||
#define EIGEN_ALWAYS_INLINE inline
|
#define EIGEN_ALWAYS_INLINE inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined __GNUC__)
|
#if (defined __GNUC__)
|
||||||
#define EIGEN_DONT_INLINE __attribute__((noinline))
|
#define EIGEN_DONT_INLINE __attribute__((noinline))
|
||||||
|
#elif (defined _MSC_VER)
|
||||||
|
#define EIGEN_DONT_INLINE __declspec(noinline)
|
||||||
#else
|
#else
|
||||||
#define EIGEN_DONT_INLINE
|
#define EIGEN_DONT_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined __GNUC__)
|
#if (defined __GNUC__)
|
||||||
#define EIGEN_DEPRECATED __attribute__((deprecated))
|
#define EIGEN_DEPRECATED __attribute__((deprecated))
|
||||||
|
#elif (defined _MSC_VER)
|
||||||
|
#define EIGEN_DEPRECATED __declspec(deprecated)
|
||||||
#else
|
#else
|
||||||
#define EIGEN_DEPRECATED
|
#define EIGEN_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* EIGEN_ALIGN_128 forces data to be 16-byte aligned, EVEN if vectorization (EIGEN_VECTORIZE) is disabled,
|
||||||
|
* so that vectorization doesn't affect binary compatibility.
|
||||||
|
*
|
||||||
|
* If we made alignment depend on whether or not EIGEN_VECTORIZE is defined, it would be impossible to link
|
||||||
|
* vectorized and non-vectorized code.
|
||||||
|
*/
|
||||||
#if (defined __GNUC__)
|
#if (defined __GNUC__)
|
||||||
#define EIGEN_ALIGN_128 __attribute__((aligned(16)))
|
#define EIGEN_ALIGN_128 __attribute__((aligned(16)))
|
||||||
#elif (defined _MSC_VER)
|
#elif (defined _MSC_VER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user