11 #ifndef EIGEN_XPRHELPER_H 12 #define EIGEN_XPRHELPER_H 17 #if EIGEN_COMP_GNUC && !EIGEN_GNUC_AT(4,3) 18 #define EIGEN_EMPTY_STRUCT_CTOR(X) \ 19 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X() {} \ 20 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X(const X& ) {} 22 #define EIGEN_EMPTY_STRUCT_CTOR(X) 29 template<
typename IndexDest,
typename IndexSrc>
34 return IndexDest(idx);
47 template<
typename ExprScalar,
typename T,
bool IsSupported>
50 template<
typename S,
typename T>
57 template<
typename ExprScalar,
typename T,
typename PromotedType,
63 template<
typename S,
typename T>
67 template<
typename S,
typename T,
typename PromotedType>
75 template<
typename ExprScalar,
typename T,
typename PromotedType>
81 template<
typename S,
typename T,
typename PromotedType,
bool ConvertibleToLiteral>
85 template<
typename S,
typename T>
96 template<
typename I1,
typename I2>
151 PacketAccess =
false,
173 template<
int Size,
typename PacketType>
179 template<
int Size,
typename PacketType>
185 template<
typename T,
int Size>
191 #if EIGEN_MAX_STATIC_ALIGN_BYTES>0 192 template<
int ArrayBytes,
int AlignmentBytes,
193 bool Match = bool((ArrayBytes%AlignmentBytes)==0),
200 template<
int ArrayBytes,
int AlignmentBytes,
bool TryHalf>
203 enum { value = AlignmentBytes };
206 template<
int ArrayBytes,
int AlignmentBytes>
215 template<
int ArrayBytes,
int AlignmentBytes>
230 template<
typename _Scalar,
int _Rows,
int _Cols,
235 int _MaxRows = _Rows,
240 IsColVector = _Cols==1 && _Rows!=1,
241 IsRowVector = _Rows==1 && _Cols!=1,
250 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
275 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_matrix_type;
283 typedef typename T::PlainObject
type;
312 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct eval;
333 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
339 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
347 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_object_eval;
395 template <
typename T>
412 template<
typename T1,
typename T2>
437 template<typename T, int n, typename PlainObject = typename plain_object_eval<T>::type>
struct nested_eval 447 CostEval = (NAsInteger+1) * ScalarReadCost + CoeffReadCost,
448 CostNoEval = NAsInteger * CoeffReadCost,
459 return const_cast<T*
>(ptr);
462 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind>
468 template<
typename Derived>
474 template<
typename Derived>
480 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind,
typename StorageKind =
typename traits<Derived>::StorageKind>
483 template<
typename Derived,
typename XprKind>
536 enum { value = LhsOrder };
578 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
581 typedef Matrix<Scalar, 1, ExpressionType::ColsAtCompileTime,
583 typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime,
593 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
596 typedef Matrix<Scalar, ExpressionType::RowsAtCompileTime, 1,
598 typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1,
608 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
624 template<
typename Expr,
typename Scalar =
typename Expr::Scalar>
638 template<
typename ExpressionType>
646 {
enum { ret =
false }; };
649 {
enum { ret =
true }; };
652 {
enum { ret =
true }; };
655 {
enum { ret =
true }; };
660 template<
typename T1,
typename T2>
663 return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());
666 template<
typename T1,
typename T2>
674 template<
typename T,
bool Vectorized=false,
typename EnaleIf =
void>
679 template<
typename T,
bool Vectorized>
688 template<
bool Vectorized>
690 template<
bool Vectorized>
694 #ifdef EIGEN_DEBUG_ASSIGN 695 std::string demangle_traversal(
int t)
704 std::string demangle_unrolling(
int t)
711 std::string demangle_flags(
int f)
765 template<
typename ScalarA,
typename ScalarB,
typename BinaryOp=
internal::scalar_product_op<ScalarA,ScalarB> >
767 #ifndef EIGEN_PARSED_BY_DOXYGEN
770 #endif // EIGEN_PARSED_BY_DOXYGEN 773 template<
typename T,
typename BinaryOp>
779 template <
typename T,
typename BinaryOp>
784 template <
typename T,
typename BinaryOp>
791 template<
typename T,
typename BinaryOp>
798 template<
typename T,
typename BinaryOp>
805 template<
typename BinaryOp>
815 #define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP,LHS,RHS) \ 816 EIGEN_STATIC_ASSERT((Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value), \ 817 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 821 #endif // EIGEN_XPRHELPER_H find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Generic expression of a matrix where all coefficients are defined by a functor.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Matrix< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > MatrixColType
#define EIGEN_STRONG_INLINE
ArrayBase< Derived > type
conditional< bool(traits< T >::Flags &NestByRefBit), T const &, const T >::type type
#define EIGEN_EMPTY_STRUCT_CTOR(X)
conditional< bool(traits< T >::Flags &NestByRefBit), T &, T >::type non_const_type
#define EIGEN_MAX_ALIGN_BYTES
plain_matrix_type< T >::type type
EIGEN_DEVICE_FUNC T * const_cast_ptr(const T *ptr)
bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< has_direct_access< T1 >::ret &&has_direct_access< T2 >::ret, T1 >::type *=0)
Array< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > array_type
remove_all< CastType >::type _CastType
const unsigned int DirectAccessBit
dense_xpr_base< Derived, XprKind >::type type
const Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
const unsigned int LvalueBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
plain_matrix_type_dense< T, typename traits< T >::XprKind, traits< T >::Flags >::type type
Represents a diagonal matrix with its storage.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T)
conditional< bool(internal::is_const< T1 >::value), typename internal::add_const_on_value_type< T2 >::type, T2 >::type type
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value()
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
find_best_packet_helper< Size, typename unpacket_traits< PacketType >::half >::type type
const unsigned int RowMajorBit
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
const unsigned int PacketAccessBit
#define EIGEN_MIN_ALIGN_BYTES
plain_matrix_type_dense< T, typename traits< T >::XprKind, evaluator< T >::Flags >::type type
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType >::type type
Matrix< Scalar, 1, ExpressionType::ColsAtCompileTime, ExpressionType::PlainObject::Options|RowMajor, 1, ExpressionType::MaxColsAtCompileTime > MatrixRowType
EIGEN_DEVICE_FUNC variable_if_dynamic()
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value()
CwiseNullaryOp< scalar_constant_op< Scalar >, const typename conditional< is_same< typename traits< Expr >::XprKind, MatrixXpr >::value, matrix_type, array_type >::type > type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamic(T value)
EIGEN_DEVICE_FUNC variable_if_dynamicindex()
Matrix< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > matrix_type
Array< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > ArrayDiagType
Base class for all 1D and 2D array, and related expressions.
EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const
const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
Matrix< _Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols > type
const unsigned int NestByRefBit
_CastType::Scalar NewScalarType
Array< Scalar, 1, ExpressionType::ColsAtCompileTime, ExpressionType::PlainObject::Options|RowMajor, 1, ExpressionType::MaxColsAtCompileTime > ArrayRowType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamicindex(T value)
conditional< is_same< CurrentScalarType, NewScalarType >::value, const XprType &, CastType >::type type
plain_matrix_type< T >::type type
General-purpose arrays with easy API for coefficient-wise operations.
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType >::type type
Expression of a diagonal matrix.
conditional< Evaluate, PlainObject, typename ref_selector< T >::type >::type type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
const unsigned int EvalBeforeNestingBit
#define eigen_internal_assert(x)
The matrix class, also used for vectors and row-vectors.
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixColType, ArrayColType >::type type
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Matrix< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > MatrixDiagType
XprType::Scalar CurrentScalarType
Base class for all dense matrices, vectors, and expressions.
const unsigned int LinearAccessBit
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
Array< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > ArrayColType
MatrixBase< Derived > type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T)
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
const unsigned int NoPreferredStorageOrderBit