#ifndef EIGEN_XPRHELPER_H
#define EIGEN_XPRHELPER_H
#include "../InternalHeaderCheck.h"
namespace Eigen {
namespace internal {
template <typename IndexType>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename make_unsigned<IndexType>::type returnUnsignedIndexValue(
const IndexType& idx) { … }
template <typename IndexDest, typename IndexSrc, bool IndexDestIsInteger = NumTraits<IndexDest>::IsInteger,
bool IndexDestIsSigned = NumTraits<IndexDest>::IsSigned,
bool IndexSrcIsInteger = NumTraits<IndexSrc>::IsInteger,
bool IndexSrcIsSigned = NumTraits<IndexSrc>::IsSigned>
struct convert_index_impl { … };
convert_index_impl<IndexDest, IndexSrc, true, true, true, false>;
convert_index_impl<IndexDest, IndexSrc, true, false, true, true>;
template <typename IndexDest, typename IndexSrc>
EIGEN_DEVICE_FUNC inline IndexDest convert_index(const IndexSrc& idx) { … }
template <typename T>
struct is_valid_index_type { … };
template <typename RowIndices, typename ColIndices>
struct valid_indexed_view_overload { … };
template <typename ExprScalar, typename T, bool IsSupported>
struct promote_scalar_arg;
promote_scalar_arg<S, T, true>;
template <typename ExprScalar, typename T, typename PromotedType,
bool ConvertibleToLiteral = internal::is_convertible<T, PromotedType>::value,
bool IsSafe = NumTraits<T>::IsInteger || !NumTraits<PromotedType>::IsInteger>
struct promote_scalar_arg_unsupported;
promote_scalar_arg<S, T, false>;
promote_scalar_arg_unsupported<S, T, PromotedType, true, true>;
promote_scalar_arg_unsupported<ExprScalar, T, PromotedType, false, true>;
promote_scalar_arg_unsupported<S, T, PromotedType, ConvertibleToLiteral, false>;
promote_scalar_arg_unsupported<S, T, S, false, true>;
class no_assignment_operator { … };
template <typename I1, typename I2>
struct promote_index_type { … };
template <typename T, int Value>
class variable_if_dynamic { … };
variable_if_dynamic<T, Dynamic>;
template <typename T, int Value>
class variable_if_dynamicindex { … };
variable_if_dynamicindex<T, DynamicIndex>;
template <typename T>
struct functor_traits { … };
template <typename Xpr>
struct nested_functor_cost { … };
nested_functor_cost<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols>>;
nested_functor_cost<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols>>;
nested_functor_cost<Map<PlainObjectType, MapOptions, StrideType>>;
nested_functor_cost<CwiseUnaryOp<Func, Xpr>>;
nested_functor_cost<CwiseNullaryOp<Func, Xpr>>;
nested_functor_cost<CwiseBinaryOp<Func, LhsXpr, RhsXpr>>;
nested_functor_cost<CwiseTernaryOp<Func, LhsXpr, MidXpr, RhsXpr>>;
template <typename Xpr>
struct functor_cost { … };
template <typename T>
struct packet_traits;
template <typename T>
struct unpacket_traits;
template <int Size, typename PacketType,
bool Stop = Size == Dynamic || (Size % unpacket_traits<PacketType>::size) == 0 ||
is_same<PacketType, typename unpacket_traits<PacketType>::half>::value>
struct find_best_packet_helper;
find_best_packet_helper<Size, PacketType, true>;
find_best_packet_helper<Size, PacketType, false>;
template <typename T, int Size>
struct find_best_packet { … };
template <int Size, typename PacketType,
bool Stop = (Size == unpacket_traits<PacketType>::size) ||
is_same<PacketType, typename unpacket_traits<PacketType>::half>::value>
struct find_packet_by_size_helper;
find_packet_by_size_helper<Size, PacketType, true>;
find_packet_by_size_helper<Size, PacketType, false>;
template <typename T, int Size>
struct find_packet_by_size { … };
find_packet_by_size<T, 1>;
#if EIGEN_MAX_STATIC_ALIGN_BYTES > 0
constexpr inline int compute_default_alignment_helper(int ArrayBytes, int AlignmentBytes) { … }
#else
constexpr inline int compute_default_alignment_helper(int ArrayBytes, int AlignmentBytes) {
EIGEN_UNUSED_VARIABLE(ArrayBytes);
EIGEN_UNUSED_VARIABLE(AlignmentBytes);
return 0;
}
#endif
template <typename T, int Size>
struct compute_default_alignment { … };
compute_default_alignment<T, Dynamic>;
template <typename Scalar_, int Rows_, int Cols_,
int Options_ = AutoAlign | ((Rows_ == 1 && Cols_ != 1) ? RowMajor
: (Cols_ == 1 && Rows_ != 1) ? ColMajor
: EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION),
int MaxRows_ = Rows_, int MaxCols_ = Cols_>
class make_proper_matrix_type { … };
constexpr inline unsigned compute_matrix_flags(int Options) { … }
constexpr inline int size_at_compile_time(int rows, int cols) { … }
template <typename XprType>
struct size_of_xpr_at_compile_time { … };
template <typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_matrix_type;
template <typename T, typename BaseClassType, int Flags>
struct plain_matrix_type_dense;
plain_matrix_type<T, Dense>;
plain_matrix_type<T, DiagonalShape>;
plain_matrix_type<T, SkewSymmetricShape>;
plain_matrix_type_dense<T, MatrixXpr, Flags>;
plain_matrix_type_dense<T, ArrayXpr, Flags>;
template <typename T, typename StorageKind = typename traits<T>::StorageKind>
struct eval;
eval<T, Dense>;
eval<T, DiagonalShape>;
eval<T, SkewSymmetricShape>;
eval<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense>;
eval<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense>;
template <typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_object_eval;
plain_object_eval<T, Dense>;
template <typename T>
struct plain_matrix_type_column_major { … };
template <typename T>
struct plain_matrix_type_row_major { … };
template <typename T>
struct ref_selector { … };
template <typename T1, typename T2>
struct transfer_constness { … };
template <typename T, int n, typename PlainObject = typename plain_object_eval<T>::type>
struct nested_eval { … };
template <typename T>
EIGEN_DEVICE_FUNC inline T* const_cast_ptr(const T* ptr) { … }
template <typename Derived, typename XprKind = typename traits<Derived>::XprKind>
struct dense_xpr_base { … };
dense_xpr_base<Derived, MatrixXpr>;
dense_xpr_base<Derived, ArrayXpr>;
template <typename Derived, typename XprKind = typename traits<Derived>::XprKind,
typename StorageKind = typename traits<Derived>::StorageKind>
struct generic_xpr_base;
generic_xpr_base<Derived, XprKind, Dense>;
template <typename XprType, typename CastType>
struct cast_return_type { … };
template <typename A, typename B>
struct promote_storage_type;
promote_storage_type<A, A>;
promote_storage_type<A, const A>;
promote_storage_type<const A, A>;
template <typename A, typename B, typename Functor>
struct cwise_promote_storage_type;
cwise_promote_storage_type<A, A, Functor>;
cwise_promote_storage_type<Dense, Dense, Functor>;
cwise_promote_storage_type<A, Dense, Functor>;
cwise_promote_storage_type<Dense, B, Functor>;
cwise_promote_storage_type<Sparse, Dense, Functor>;
cwise_promote_storage_type<Dense, Sparse, Functor>;
template <typename LhsKind, typename RhsKind, int LhsOrder, int RhsOrder>
struct cwise_promote_storage_order { … };
cwise_promote_storage_order<LhsKind, Sparse, LhsOrder, RhsOrder>;
cwise_promote_storage_order<Sparse, RhsKind, LhsOrder, RhsOrder>;
cwise_promote_storage_order<Sparse, Sparse, Order, Order>;
template <typename A, typename B, int ProductTag>
struct product_promote_storage_type;
product_promote_storage_type<A, A, ProductTag>;
product_promote_storage_type<Dense, Dense, ProductTag>;
product_promote_storage_type<A, Dense, ProductTag>;
product_promote_storage_type<Dense, B, ProductTag>;
product_promote_storage_type<A, DiagonalShape, ProductTag>;
product_promote_storage_type<DiagonalShape, B, ProductTag>;
product_promote_storage_type<Dense, DiagonalShape, ProductTag>;
product_promote_storage_type<DiagonalShape, Dense, ProductTag>;
product_promote_storage_type<A, SkewSymmetricShape, ProductTag>;
product_promote_storage_type<SkewSymmetricShape, B, ProductTag>;
product_promote_storage_type<Dense, SkewSymmetricShape, ProductTag>;
product_promote_storage_type<SkewSymmetricShape, Dense, ProductTag>;
product_promote_storage_type<SkewSymmetricShape, SkewSymmetricShape, ProductTag>;
product_promote_storage_type<A, PermutationStorage, ProductTag>;
product_promote_storage_type<PermutationStorage, B, ProductTag>;
product_promote_storage_type<Dense, PermutationStorage, ProductTag>;
product_promote_storage_type<PermutationStorage, Dense, ProductTag>;
template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
struct plain_row_type { … };
template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
struct plain_col_type { … };
template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
struct plain_diag_type { … };
template <typename Expr, typename Scalar = typename Expr::Scalar>
struct plain_constant_type { … };
template <typename ExpressionType>
struct is_lvalue { … };
template <typename T>
struct is_diagonal { … };
is_diagonal<DiagonalBase<T>>;
is_diagonal<DiagonalWrapper<T>>;
is_diagonal<DiagonalMatrix<T, S>>;
template <typename T>
struct is_identity { … };
is_identity<CwiseNullaryOp<internal::scalar_identity_op<typename T::Scalar>, T>>;
template <typename S1, typename S2>
struct glue_shapes;
template <>
struct glue_shapes<DenseShape, TriangularShape> { … };
template <typename T1, typename T2>
struct possibly_same_dense { … };
template <typename T1, typename T2>
EIGEN_DEVICE_FUNC bool is_same_dense(const T1& mat1, const T2& mat2,
std::enable_if_t<possibly_same_dense<T1, T2>::value>* = 0) { … }
template <typename T1, typename T2>
EIGEN_DEVICE_FUNC bool is_same_dense(const T1&, const T2&, std::enable_if_t<!possibly_same_dense<T1, T2>::value>* = 0) { … }
template <typename T, bool Vectorized = false, typename EnableIf = void>
struct scalar_div_cost { … };
scalar_div_cost<std::complex<T>, Vectorized>;
scalar_div_cost<long, Vectorized, std::conditional_t<sizeof(long) == 8, void, false_type>>;
scalar_div_cost<unsigned long, Vectorized, std::conditional_t<sizeof(long) == 8, void, false_type>>;
#ifdef EIGEN_DEBUG_ASSIGN
std::string demangle_traversal(int t) {
if (t == DefaultTraversal) return "DefaultTraversal";
if (t == LinearTraversal) return "LinearTraversal";
if (t == InnerVectorizedTraversal) return "InnerVectorizedTraversal";
if (t == LinearVectorizedTraversal) return "LinearVectorizedTraversal";
if (t == SliceVectorizedTraversal) return "SliceVectorizedTraversal";
return "?";
}
std::string demangle_unrolling(int t) {
if (t == NoUnrolling) return "NoUnrolling";
if (t == InnerUnrolling) return "InnerUnrolling";
if (t == CompleteUnrolling) return "CompleteUnrolling";
return "?";
}
std::string demangle_flags(int f) {
std::string res;
if (f & RowMajorBit) res += " | RowMajor";
if (f & PacketAccessBit) res += " | Packet";
if (f & LinearAccessBit) res += " | Linear";
if (f & LvalueBit) res += " | Lvalue";
if (f & DirectAccessBit) res += " | Direct";
if (f & NestByRefBit) res += " | NestByRef";
if (f & NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
return res;
}
#endif
template <typename XprType>
struct is_block_xpr : std::false_type { … };
is_block_xpr<Block<XprType, BlockRows, BlockCols, InnerPanel>>;
is_block_xpr<const Block<XprType, BlockRows, BlockCols, InnerPanel>>;
template <typename XprType>
struct block_xpr_helper { … };
block_xpr_helper<Block<XprType, BlockRows, BlockCols, InnerPanel>>;
block_xpr_helper<const Block<XprType, BlockRows, BlockCols, InnerPanel>>;
template <typename XprType>
struct is_matrix_base_xpr : std::is_base_of<MatrixBase<remove_all_t<XprType>>, remove_all_t<XprType>> { … };
template <typename XprType>
struct is_permutation_base_xpr : std::is_base_of<PermutationBase<remove_all_t<XprType>>, remove_all_t<XprType>> { … };
}
template <typename ScalarA, typename ScalarB, typename BinaryOp = internal::scalar_product_op<ScalarA, ScalarB>>
struct ScalarBinaryOpTraits
#ifndef EIGEN_PARSED_BY_DOXYGEN
: internal::scalar_product_traits<ScalarA, ScalarB>
#endif
{
};
ScalarBinaryOpTraits<T, T, BinaryOp>;
ScalarBinaryOpTraits<T, typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex, T>>::Real, BinaryOp>;
ScalarBinaryOpTraits<typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex, T>>::Real, T, BinaryOp>;
ScalarBinaryOpTraits<T, void, BinaryOp>;
ScalarBinaryOpTraits<void, T, BinaryOp>;
ScalarBinaryOpTraits<void, void, BinaryOp>;
#define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP, LHS, RHS) …
}
#endif