XprHelper.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_XPRHELPER_H
12 #define EIGEN_XPRHELPER_H
13 
14 // IWYU pragma: private
15 #include "../InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
19 namespace internal {
20 
21 // useful for unsigned / signed integer comparisons when idx is intended to be non-negative
22 template <typename IndexType>
24  const IndexType& idx) {
25  EIGEN_STATIC_ASSERT((NumTraits<IndexType>::IsInteger), THIS FUNCTION IS FOR INTEGER TYPES)
26  eigen_internal_assert(idx >= 0 && "Index value is negative and target type is unsigned");
27  using UnsignedType = typename make_unsigned<IndexType>::type;
28  return static_cast<UnsignedType>(idx);
29 }
30 
31 template <typename IndexDest, typename IndexSrc, bool IndexDestIsInteger = NumTraits<IndexDest>::IsInteger,
32  bool IndexDestIsSigned = NumTraits<IndexDest>::IsSigned,
33  bool IndexSrcIsInteger = NumTraits<IndexSrc>::IsInteger,
34  bool IndexSrcIsSigned = NumTraits<IndexSrc>::IsSigned>
36  static inline EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc& idx) {
37  eigen_internal_assert(idx <= NumTraits<IndexDest>::highest() && "Index value is too big for target type");
38  return static_cast<IndexDest>(idx);
39  }
40 };
41 template <typename IndexDest, typename IndexSrc>
42 struct convert_index_impl<IndexDest, IndexSrc, true, true, true, false> {
43  // IndexDest is a signed integer
44  // IndexSrc is an unsigned integer
45  static inline EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc& idx) {
47  "Index value is too big for target type");
48  return static_cast<IndexDest>(idx);
49  }
50 };
51 template <typename IndexDest, typename IndexSrc>
52 struct convert_index_impl<IndexDest, IndexSrc, true, false, true, true> {
53  // IndexDest is an unsigned integer
54  // IndexSrc is a signed integer
55  static inline EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc& idx) {
57  "Index value is too big for target type");
58  return static_cast<IndexDest>(idx);
59  }
60 };
61 
62 template <typename IndexDest, typename IndexSrc>
63 EIGEN_DEVICE_FUNC inline IndexDest convert_index(const IndexSrc& idx) {
65 }
66 
67 // true if T can be considered as an integral index (i.e., and integral type or enum)
68 template <typename T>
71 };
72 
73 // true if both types are not valid index types
74 template <typename RowIndices, typename ColIndices>
76  enum {
78  };
79 };
80 
81 // promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
82 // expression * scalar
83 // Its role is to determine how the type T of the scalar operand should be promoted given the scalar type ExprScalar of
84 // the given expression. The IsSupported template parameter must be provided by the caller as:
85 // internal::has_ReturnType<ScalarBinaryOpTraits<ExprScalar,T,op> >::value using the proper order for ExprScalar and T.
86 // Then the logic is as follows:
87 // - if the operation is natively supported as defined by IsSupported, then the scalar type is not promoted, and T is
88 // returned.
89 // - otherwise, NumTraits<ExprScalar>::Literal is returned if T is implicitly convertible to
90 // NumTraits<ExprScalar>::Literal AND that this does not imply a float to integer conversion.
91 // - otherwise, ExprScalar is returned if T is implicitly convertible to ExprScalar AND that this does not imply a
92 // float to integer conversion.
93 // - In all other cases, the promoted type is not defined, and the respective operation is thus invalid and not
94 // available (SFINAE).
95 template <typename ExprScalar, typename T, bool IsSupported>
97 
98 template <typename S, typename T>
99 struct promote_scalar_arg<S, T, true> {
100  typedef T type;
101 };
102 
103 // Recursively check safe conversion to PromotedType, and then ExprScalar if they are different.
104 template <typename ExprScalar, typename T, typename PromotedType,
105  bool ConvertibleToLiteral = internal::is_convertible<T, PromotedType>::value,
108 
109 // Start recursion with NumTraits<ExprScalar>::Literal
110 template <typename S, typename T>
111 struct promote_scalar_arg<S, T, false> : promote_scalar_arg_unsupported<S, T, typename NumTraits<S>::Literal> {};
112 
113 // We found a match!
114 template <typename S, typename T, typename PromotedType>
115 struct promote_scalar_arg_unsupported<S, T, PromotedType, true, true> {
116  typedef PromotedType type;
117 };
118 
119 // No match, but no real-to-integer issues, and ExprScalar and current PromotedType are different,
120 // so let's try to promote to ExprScalar
121 template <typename ExprScalar, typename T, typename PromotedType>
122 struct promote_scalar_arg_unsupported<ExprScalar, T, PromotedType, false, true>
123  : promote_scalar_arg_unsupported<ExprScalar, T, ExprScalar> {};
124 
125 // Unsafe real-to-integer, let's stop.
126 template <typename S, typename T, typename PromotedType, bool ConvertibleToLiteral>
127 struct promote_scalar_arg_unsupported<S, T, PromotedType, ConvertibleToLiteral, false> {};
128 
129 // T is not even convertible to ExprScalar, let's stop.
130 template <typename S, typename T>
131 struct promote_scalar_arg_unsupported<S, T, S, false, true> {};
132 
133 // classes inheriting no_assignment_operator don't generate a default operator=.
135  private:
137 
138  protected:
141 };
142 
144 template <typename I1, typename I2>
146  typedef std::conditional_t<(sizeof(I1) < sizeof(I2)), I2, I1> type;
147 };
148 
153 template <typename T, int Value>
155  public:
159  eigen_assert(v == T(Value));
160  }
165  eigen_assert(v == T(Value));
166  }
167 };
168 
169 template <typename T>
172 
173  public:
175  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; }
176  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; }
178 };
179 
182 template <typename T, int Value>
184  public:
187  eigen_assert(v == T(Value));
188  }
191 };
192 
193 template <typename T>
197 
198  public:
200  EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const { return m_value; }
202 };
203 
204 template <typename T>
206  enum { Cost = 10, PacketAccess = false, IsRepeatable = false };
207 };
208 
209 // estimates the cost of lazily evaluating a generic functor by unwinding the expression
210 template <typename Xpr>
212  static constexpr Index Cost = static_cast<Index>(functor_traits<Xpr>::Cost);
213 };
214 
215 template <typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>
216 struct nested_functor_cost<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols>> {
217  static constexpr Index Cost = 1;
218 };
219 
220 template <typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>
221 struct nested_functor_cost<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols>> {
222  static constexpr Index Cost = 1;
223 };
224 
225 // TODO: assign a cost to the stride type?
226 template <typename PlainObjectType, int MapOptions, typename StrideType>
227 struct nested_functor_cost<Map<PlainObjectType, MapOptions, StrideType>> : nested_functor_cost<PlainObjectType> {};
228 
229 template <typename Func, typename Xpr>
230 struct nested_functor_cost<CwiseUnaryOp<Func, Xpr>> {
234 };
235 
236 template <typename Func, typename Xpr>
241 };
242 
243 template <typename Func, typename LhsXpr, typename RhsXpr>
244 struct nested_functor_cost<CwiseBinaryOp<Func, LhsXpr, RhsXpr>> {
250 };
251 
252 template <typename Func, typename LhsXpr, typename MidXpr, typename RhsXpr>
253 struct nested_functor_cost<CwiseTernaryOp<Func, LhsXpr, MidXpr, RhsXpr>> {
260 };
261 
262 template <typename Xpr>
263 struct functor_cost {
265 };
266 
267 template <typename T>
268 struct packet_traits;
269 
270 template <typename T>
271 struct unpacket_traits;
272 
273 template <int Size, typename PacketType,
274  bool Stop = Size == Dynamic || (Size % unpacket_traits<PacketType>::size) == 0 ||
277 
278 template <int Size, typename PacketType>
280  typedef PacketType type;
281 };
282 
283 template <int Size, typename PacketType>
286 };
287 
288 template <typename T, int Size>
291 };
292 
293 template <int Size, typename PacketType,
294  bool Stop = (Size == unpacket_traits<PacketType>::size) ||
297 template <int Size, typename PacketType>
299  using type = PacketType;
300 };
301 template <int Size, typename PacketType>
304 };
305 
306 template <typename T, int Size>
309  static constexpr bool value = (Size == unpacket_traits<type>::size);
310 };
311 template <typename T>
312 struct find_packet_by_size<T, 1> {
313  using type = typename unpacket_traits<T>::type;
314  static constexpr bool value = (unpacket_traits<type>::size == 1);
315 };
316 
317 #if EIGEN_MAX_STATIC_ALIGN_BYTES > 0
318 constexpr inline int compute_default_alignment_helper(int ArrayBytes, int AlignmentBytes) {
319  if ((ArrayBytes % AlignmentBytes) == 0) {
320  return AlignmentBytes;
321  } else if (EIGEN_MIN_ALIGN_BYTES < AlignmentBytes) {
322  return compute_default_alignment_helper(ArrayBytes, AlignmentBytes / 2);
323  } else {
324  return 0;
325  }
326 }
327 #else
328 // If static alignment is disabled, no need to bother.
329 // This also avoids a division by zero
330 constexpr inline int compute_default_alignment_helper(int ArrayBytes, int AlignmentBytes) {
331  EIGEN_UNUSED_VARIABLE(ArrayBytes);
332  EIGEN_UNUSED_VARIABLE(AlignmentBytes);
333  return 0;
334 }
335 #endif
336 
337 template <typename T, int Size>
340 };
341 
342 template <typename T>
345 };
346 
347 template <typename Scalar_, int Rows_, int Cols_,
348  int Options_ = AutoAlign | ((Rows_ == 1 && Cols_ != 1) ? RowMajor
349  : (Cols_ == 1 && Rows_ != 1) ? ColMajor
351  int MaxRows_ = Rows_, int MaxCols_ = Cols_>
353  enum {
354  IsColVector = Cols_ == 1 && Rows_ != 1,
355  IsRowVector = Rows_ == 1 && Cols_ != 1,
356  Options = IsColVector ? (Options_ | ColMajor) & ~RowMajor
357  : IsRowVector ? (Options_ | RowMajor) & ~ColMajor
358  : Options_
359  };
360 
361  public:
363 };
364 
365 constexpr inline unsigned compute_matrix_flags(int Options) {
366  unsigned row_major_bit = Options & RowMajor ? RowMajorBit : 0;
367  // FIXME currently we still have to handle DirectAccessBit at the expression level to handle DenseCoeffsBase<>
368  // and then propagate this information to the evaluator's flags.
369  // However, I (Gael) think that DirectAccessBit should only matter at the evaluation stage.
370  return DirectAccessBit | LvalueBit | NestByRefBit | row_major_bit;
371 }
372 
373 constexpr inline int size_at_compile_time(int rows, int cols) {
374  if (rows == 0 || cols == 0) return 0;
375  if (rows == Dynamic || cols == Dynamic) return Dynamic;
376  return rows * cols;
377 }
378 
379 template <typename XprType>
382 };
383 
384 /* plain_matrix_type : the difference from eval is that plain_matrix_type is always a plain matrix type,
385  * whereas eval is a const reference in the case of a matrix
386  */
387 
388 template <typename T, typename StorageKind = typename traits<T>::StorageKind>
390 template <typename T, typename BaseClassType, int Flags>
392 template <typename T>
395 };
396 template <typename T>
398  typedef typename T::PlainObject type;
399 };
400 
401 template <typename T>
403  typedef typename T::PlainObject type;
404 };
405 
406 template <typename T, int Flags>
412 };
413 
414 template <typename T, int Flags>
420 };
421 
422 /* eval : the return type of eval(). For matrices, this is just a const reference
423  * in order to avoid a useless copy
424  */
425 
426 template <typename T, typename StorageKind = typename traits<T>::StorageKind>
427 struct eval;
428 
429 template <typename T>
430 struct eval<T, Dense> {
432  // typedef typename T::PlainObject type;
433  // typedef T::Matrix<typename traits<T>::Scalar,
434  // traits<T>::RowsAtCompileTime,
435  // traits<T>::ColsAtCompileTime,
436  // AutoAlign | (traits<T>::Flags&RowMajorBit ? RowMajor : ColMajor),
437  // traits<T>::MaxRowsAtCompileTime,
438  // traits<T>::MaxColsAtCompileTime
439  // > type;
440 };
441 
442 template <typename T>
443 struct eval<T, DiagonalShape> {
445 };
446 
447 template <typename T>
450 };
451 
452 // for matrices, no need to evaluate, just use a const reference to avoid a useless copy
453 template <typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
454 struct eval<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense> {
456 };
457 
458 template <typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
459 struct eval<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense> {
461 };
462 
463 /* similar to plain_matrix_type, but using the evaluator's Flags */
464 template <typename T, typename StorageKind = typename traits<T>::StorageKind>
466 
467 template <typename T>
470 };
471 
472 /* plain_matrix_type_column_major : same as plain_matrix_type but guaranteed to be column-major
473  */
474 template <typename T>
476  enum {
481  };
483  MaxCols>
485 };
486 
487 /* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major
488  */
489 template <typename T>
491  enum {
496  };
498  MaxCols>
500 };
501 
505 template <typename T>
506 struct ref_selector {
507  typedef std::conditional_t<bool(traits<T>::Flags& NestByRefBit), T const&, const T> type;
508 
509  typedef std::conditional_t<bool(traits<T>::Flags& NestByRefBit), T&, T> non_const_type;
510 };
511 
513 template <typename T1, typename T2>
516 };
517 
518 // However, we still need a mechanism to detect whether an expression which is evaluated multiple time
519 // has to be evaluated into a temporary.
520 // That's the purpose of this new nested_eval helper:
533 struct nested_eval {
534  enum {
536  CoeffReadCost =
537  evaluator<T>::CoeffReadCost, // NOTE What if an evaluator evaluate itself into a temporary?
538  // Then CoeffReadCost will be small (e.g., 1) but we still have to evaluate,
539  // especially if n>1. This situation is already taken care by the
540  // EvalBeforeNestingBit flag, which is turned ON for all evaluator creating a
541  // temporary. This flag is then propagated by the parent evaluators. Another
542  // solution could be to count the number of temps?
547  };
548 
550 };
551 
552 template <typename T>
553 EIGEN_DEVICE_FUNC inline T* const_cast_ptr(const T* ptr) {
554  return const_cast<T*>(ptr);
555 }
556 
557 template <typename Derived, typename XprKind = typename traits<Derived>::XprKind>
559  /* dense_xpr_base should only ever be used on dense expressions, thus falling either into the MatrixXpr or into the
560  * ArrayXpr cases */
561 };
562 
563 template <typename Derived>
564 struct dense_xpr_base<Derived, MatrixXpr> {
566 };
567 
568 template <typename Derived>
569 struct dense_xpr_base<Derived, ArrayXpr> {
571 };
572 
573 template <typename Derived, typename XprKind = typename traits<Derived>::XprKind,
574  typename StorageKind = typename traits<Derived>::StorageKind>
576 
577 template <typename Derived, typename XprKind>
578 struct generic_xpr_base<Derived, XprKind, Dense> {
580 };
581 
582 template <typename XprType, typename CastType>
588 };
589 
590 template <typename A, typename B>
592 
593 template <typename A>
595  typedef A ret;
596 };
597 template <typename A>
598 struct promote_storage_type<A, const A> {
599  typedef A ret;
600 };
601 template <typename A>
602 struct promote_storage_type<const A, A> {
603  typedef A ret;
604 };
605 
619 template <typename A, typename B, typename Functor>
621 
622 template <typename A, typename Functor>
624  typedef A ret;
625 };
626 template <typename Functor>
628  typedef Dense ret;
629 };
630 template <typename A, typename Functor>
632  typedef Dense ret;
633 };
634 template <typename B, typename Functor>
636  typedef Dense ret;
637 };
638 template <typename Functor>
640  typedef Sparse ret;
641 };
642 template <typename Functor>
644  typedef Sparse ret;
645 };
646 
647 template <typename LhsKind, typename RhsKind, int LhsOrder, int RhsOrder>
649  enum { value = LhsOrder };
650 };
651 
652 template <typename LhsKind, int LhsOrder, int RhsOrder>
653 struct cwise_promote_storage_order<LhsKind, Sparse, LhsOrder, RhsOrder> {
654  enum { value = RhsOrder };
655 };
656 template <typename RhsKind, int LhsOrder, int RhsOrder>
657 struct cwise_promote_storage_order<Sparse, RhsKind, LhsOrder, RhsOrder> {
658  enum { value = LhsOrder };
659 };
660 template <int Order>
661 struct cwise_promote_storage_order<Sparse, Sparse, Order, Order> {
662  enum { value = Order };
663 };
664 
679 template <typename A, typename B, int ProductTag>
681 
682 template <typename A, int ProductTag>
683 struct product_promote_storage_type<A, A, ProductTag> {
684  typedef A ret;
685 };
686 template <int ProductTag>
688  typedef Dense ret;
689 };
690 template <typename A, int ProductTag>
691 struct product_promote_storage_type<A, Dense, ProductTag> {
692  typedef Dense ret;
693 };
694 template <typename B, int ProductTag>
695 struct product_promote_storage_type<Dense, B, ProductTag> {
696  typedef Dense ret;
697 };
698 
699 template <typename A, int ProductTag>
701  typedef A ret;
702 };
703 template <typename B, int ProductTag>
705  typedef B ret;
706 };
707 template <int ProductTag>
709  typedef Dense ret;
710 };
711 template <int ProductTag>
713  typedef Dense ret;
714 };
715 
716 template <typename A, int ProductTag>
718  typedef A ret;
719 };
720 template <typename B, int ProductTag>
722  typedef B ret;
723 };
724 template <int ProductTag>
726  typedef Dense ret;
727 };
728 template <int ProductTag>
730  typedef Dense ret;
731 };
732 template <int ProductTag>
734  typedef Dense ret;
735 };
736 
737 template <typename A, int ProductTag>
739  typedef A ret;
740 };
741 template <typename B, int ProductTag>
743  typedef B ret;
744 };
745 template <int ProductTag>
747  typedef Dense ret;
748 };
749 template <int ProductTag>
751  typedef Dense ret;
752 };
753 
757 template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
759  typedef Matrix<Scalar, 1, ExpressionType::ColsAtCompileTime,
760  int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime>
762  typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options) | int(RowMajor),
763  1, ExpressionType::MaxColsAtCompileTime>
765 
766  typedef std::conditional_t<is_same<typename traits<ExpressionType>::XprKind, MatrixXpr>::value, MatrixRowType,
767  ArrayRowType>
769 };
770 
771 template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
773  typedef Matrix<Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options & ~RowMajor,
774  ExpressionType::MaxRowsAtCompileTime, 1>
776  typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options & ~RowMajor,
777  ExpressionType::MaxRowsAtCompileTime, 1>
779 
780  typedef std::conditional_t<is_same<typename traits<ExpressionType>::XprKind, MatrixXpr>::value, MatrixColType,
781  ArrayColType>
783 };
784 
785 template <typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
787  enum {
788  diag_size = internal::min_size_prefer_dynamic(ExpressionType::RowsAtCompileTime, ExpressionType::ColsAtCompileTime),
789  max_diag_size = min_size_prefer_fixed(ExpressionType::MaxRowsAtCompileTime, ExpressionType::MaxColsAtCompileTime)
790  };
794 
795  typedef std::conditional_t<is_same<typename traits<ExpressionType>::XprKind, MatrixXpr>::value, MatrixDiagType,
798 };
799 
800 template <typename Expr, typename Scalar = typename Expr::Scalar>
803 
807 
811 
812  typedef CwiseNullaryOp<
814  const std::conditional_t<is_same<typename traits<Expr>::XprKind, MatrixXpr>::value, matrix_type, array_type>>
816 };
817 
818 template <typename ExpressionType>
819 struct is_lvalue {
821 };
822 
823 template <typename T>
824 struct is_diagonal {
825  enum { ret = false };
826 };
827 
828 template <typename T>
830  enum { ret = true };
831 };
832 
833 template <typename T>
835  enum { ret = true };
836 };
837 
838 template <typename T, int S>
840  enum { ret = true };
841 };
842 
843 template <typename T>
844 struct is_identity {
845  enum { value = false };
846 };
847 
848 template <typename T>
849 struct is_identity<CwiseNullaryOp<internal::scalar_identity_op<typename T::Scalar>, T>> {
850  enum { value = true };
851 };
852 
853 template <typename S1, typename S2>
854 struct glue_shapes;
855 template <>
858 };
859 
860 template <typename T1, typename T2>
862  enum {
865  };
866 };
867 
868 template <typename T1, typename T2>
869 EIGEN_DEVICE_FUNC bool is_same_dense(const T1& mat1, const T2& mat2,
870  std::enable_if_t<possibly_same_dense<T1, T2>::value>* = 0) {
871  return (mat1.data() == mat2.data()) && (mat1.innerStride() == mat2.innerStride()) &&
872  (mat1.outerStride() == mat2.outerStride());
873 }
874 
875 template <typename T1, typename T2>
876 EIGEN_DEVICE_FUNC bool is_same_dense(const T1&, const T2&, std::enable_if_t<!possibly_same_dense<T1, T2>::value>* = 0) {
877  return false;
878 }
879 
880 // Internal helper defining the cost of a scalar division for the type T.
881 // The default heuristic can be specialized for each scalar type and architecture.
882 template <typename T, bool Vectorized = false, typename EnableIf = void>
884  enum { value = 8 * NumTraits<T>::MulCost };
885 };
886 
887 template <typename T, bool Vectorized>
888 struct scalar_div_cost<std::complex<T>, Vectorized> {
890 };
891 
892 template <bool Vectorized>
893 struct scalar_div_cost<signed long, Vectorized, std::conditional_t<sizeof(long) == 8, void, false_type>> {
894  enum { value = 24 };
895 };
896 template <bool Vectorized>
897 struct scalar_div_cost<unsigned long, Vectorized, std::conditional_t<sizeof(long) == 8, void, false_type>> {
898  enum { value = 21 };
899 };
900 
901 #ifdef EIGEN_DEBUG_ASSIGN
902 std::string demangle_traversal(int t) {
903  if (t == DefaultTraversal) return "DefaultTraversal";
904  if (t == LinearTraversal) return "LinearTraversal";
905  if (t == InnerVectorizedTraversal) return "InnerVectorizedTraversal";
906  if (t == LinearVectorizedTraversal) return "LinearVectorizedTraversal";
907  if (t == SliceVectorizedTraversal) return "SliceVectorizedTraversal";
908  return "?";
909 }
910 std::string demangle_unrolling(int t) {
911  if (t == NoUnrolling) return "NoUnrolling";
912  if (t == InnerUnrolling) return "InnerUnrolling";
913  if (t == CompleteUnrolling) return "CompleteUnrolling";
914  return "?";
915 }
916 std::string demangle_flags(int f) {
918  if (f & RowMajorBit) res += " | RowMajor";
919  if (f & PacketAccessBit) res += " | Packet";
920  if (f & LinearAccessBit) res += " | Linear";
921  if (f & LvalueBit) res += " | Lvalue";
922  if (f & DirectAccessBit) res += " | Direct";
923  if (f & NestByRefBit) res += " | NestByRef";
924  if (f & NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
925 
926  return res;
927 }
928 #endif
929 
930 template <typename XprType>
931 struct is_block_xpr : std::false_type {};
932 
933 template <typename XprType, int BlockRows, int BlockCols, bool InnerPanel>
934 struct is_block_xpr<Block<XprType, BlockRows, BlockCols, InnerPanel>> : std::true_type {};
935 
936 template <typename XprType, int BlockRows, int BlockCols, bool InnerPanel>
937 struct is_block_xpr<const Block<XprType, BlockRows, BlockCols, InnerPanel>> : std::true_type {};
938 
939 // Helper utility for constructing non-recursive block expressions.
940 template <typename XprType>
942  using BaseType = XprType;
943 
944  // For regular block expressions, simply forward along the InnerPanel argument,
945  // which is set when calling row/column expressions.
946  static constexpr bool is_inner_panel(bool inner_panel) { return inner_panel; }
947 
948  // Only enable non-const base function if XprType is not const (otherwise we get a duplicate definition).
951  return xpr;
952  }
953  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const BaseType& base(const XprType& xpr) { return xpr; }
954  static constexpr EIGEN_ALWAYS_INLINE Index row(const XprType& /*xpr*/, Index r) { return r; }
955  static constexpr EIGEN_ALWAYS_INLINE Index col(const XprType& /*xpr*/, Index c) { return c; }
956 };
957 
958 template <typename XprType, int BlockRows, int BlockCols, bool InnerPanel>
959 struct block_xpr_helper<Block<XprType, BlockRows, BlockCols, InnerPanel>> {
961  // Recursive helper in case of explicit block-of-block expression.
964 
965  // For block-of-block expressions, we need to combine the InnerPannel trait
966  // with that of the block subexpression.
967  static constexpr bool is_inner_panel(bool inner_panel) { return InnerPanel && inner_panel; }
968 
969  // Only enable non-const base function if XprType is not const (otherwise we get a duplicates definition).
972  return NestedXprHelper::base(xpr.nestedExpression());
973  }
975  return NestedXprHelper::base(xpr.nestedExpression());
976  }
977  static constexpr EIGEN_ALWAYS_INLINE Index row(const BlockXprType& xpr, Index r) {
978  return xpr.startRow() + NestedXprHelper::row(xpr.nestedExpression(), r);
979  }
980  static constexpr EIGEN_ALWAYS_INLINE Index col(const BlockXprType& xpr, Index c) {
981  return xpr.startCol() + NestedXprHelper::col(xpr.nestedExpression(), c);
982  }
983 };
984 
985 template <typename XprType, int BlockRows, int BlockCols, bool InnerPanel>
986 struct block_xpr_helper<const Block<XprType, BlockRows, BlockCols, InnerPanel>>
987  : block_xpr_helper<Block<XprType, BlockRows, BlockCols, InnerPanel>> {};
988 
989 template <typename XprType>
990 struct is_matrix_base_xpr : std::is_base_of<MatrixBase<remove_all_t<XprType>>, remove_all_t<XprType>> {};
991 
992 template <typename XprType>
993 struct is_permutation_base_xpr : std::is_base_of<PermutationBase<remove_all_t<XprType>>, remove_all_t<XprType>> {};
994 
995 } // end namespace internal
996 
1037 template <typename ScalarA, typename ScalarB, typename BinaryOp = internal::scalar_product_op<ScalarA, ScalarB>>
1039 #ifndef EIGEN_PARSED_BY_DOXYGEN
1040  // for backward compatibility, use the hints given by the (deprecated) internal::scalar_product_traits class.
1041  : internal::scalar_product_traits<ScalarA, ScalarB>
1042 #endif // EIGEN_PARSED_BY_DOXYGEN
1043 {
1044 };
1045 
1046 template <typename T, typename BinaryOp>
1047 struct ScalarBinaryOpTraits<T, T, BinaryOp> {
1048  typedef T ReturnType;
1049 };
1050 
1051 template <typename T, typename BinaryOp>
1052 struct ScalarBinaryOpTraits<T, typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex, T>>::Real, BinaryOp> {
1053  typedef T ReturnType;
1054 };
1055 template <typename T, typename BinaryOp>
1056 struct ScalarBinaryOpTraits<typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex, T>>::Real, T, BinaryOp> {
1057  typedef T ReturnType;
1058 };
1059 
1060 // For Matrix * Permutation
1061 template <typename T, typename BinaryOp>
1062 struct ScalarBinaryOpTraits<T, void, BinaryOp> {
1063  typedef T ReturnType;
1064 };
1065 
1066 // For Permutation * Matrix
1067 template <typename T, typename BinaryOp>
1068 struct ScalarBinaryOpTraits<void, T, BinaryOp> {
1069  typedef T ReturnType;
1070 };
1071 
1072 // for Permutation*Permutation
1073 template <typename BinaryOp>
1074 struct ScalarBinaryOpTraits<void, void, BinaryOp> {
1075  typedef void ReturnType;
1076 };
1077 
1078 // We require Lhs and Rhs to have "compatible" scalar types.
1079 // It is tempting to always allow mixing different types but remember that this is often impossible in the vectorized
1080 // paths. So allowing mixing different types gives very unexpected errors when enabling vectorization, when the user
1081 // tries to add together a float matrix and a double matrix.
1082 #define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP, LHS, RHS) \
1083  EIGEN_STATIC_ASSERT( \
1084  (Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS, BINOP>>::value), \
1085  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
1086 
1087 } // end namespace Eigen
1088 
1089 #endif // EIGEN_XPRHELPER_H
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
#define EIGEN_MIN_ALIGN_BYTES
Definition: ConfigureVectorization.h:73
#define EIGEN_MAX_STATIC_ALIGN_BYTES
Definition: ConfigureVectorization.h:118
#define EIGEN_MAX_ALIGN_BYTES
Definition: ConfigureVectorization.h:163
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Macro to explicitly define the default copy constructor. This is necessary, because the implicit defi...
Definition: Macros.h:1119
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:845
#define eigen_internal_assert(x)
Definition: Macros.h:916
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Macro to manually define default constructors and destructors. This is necessary when the copy constr...
Definition: Macros.h:1137
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:966
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:922
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
Definition: Macros.h:31
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_NO_THROW
Definition: Macros.h:1269
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
m col(1)
m row(1)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
MatrixXd mat1(size, size)
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
SCALAR Scalar
Definition: bench_gemm.cpp:45
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 100 >, boost::multiprecision::et_on > Real
Definition: boostmultiprec.cpp:77
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:44
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:48
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:110
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:79
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:64
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
Definition: CwiseTernaryOp.h:86
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:53
Base class for diagonal matrices and expressions.
Definition: DiagonalMatrix.h:33
Represents a diagonal matrix with its storage.
Definition: DiagonalMatrix.h:172
Expression of a diagonal matrix.
Definition: DiagonalMatrix.h:320
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: XprHelper.h:352
Matrix< Scalar_, Rows_, Cols_, Options, MaxRows_, MaxCols_ > type
Definition: XprHelper.h:362
Definition: XprHelper.h:134
no_assignment_operator & operator=(const no_assignment_operator &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Definition: XprHelper.h:177
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const
Definition: XprHelper.h:175
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamic(T value=0) EIGEN_NO_THROW
Definition: XprHelper.h:174
Definition: XprHelper.h:154
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T v) const
Definition: XprHelper.h:163
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:161
EIGEN_DEVICE_FUNC variable_if_dynamicindex()
Definition: XprHelper.h:196
EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const
Definition: XprHelper.h:200
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Definition: XprHelper.h:201
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamicindex(T value)
Definition: XprHelper.h:199
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T)
Definition: XprHelper.h:190
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:189
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamicindex(T v)
Definition: XprHelper.h:185
Definition: matrices.h:74
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
@ InnerVectorizedTraversal
Definition: Constants.h:284
@ LinearVectorizedTraversal
Definition: Constants.h:287
@ DefaultTraversal
Definition: Constants.h:279
@ SliceVectorizedTraversal
Definition: Constants.h:290
@ LinearTraversal
Definition: Constants.h:281
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
@ AutoAlign
Definition: Constants.h:322
@ InnerUnrolling
Definition: Constants.h:303
@ CompleteUnrolling
Definition: Constants.h:306
@ NoUnrolling
Definition: Constants.h:301
const unsigned int PacketAccessBit
Definition: Constants.h:97
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:182
const unsigned int LinearAccessBit
Definition: Constants.h:133
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:74
const unsigned int DirectAccessBit
Definition: Constants.h:159
const unsigned int LvalueBit
Definition: Constants.h:148
const unsigned int RowMajorBit
Definition: Constants.h:70
return int(ret)+1
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
constexpr int plain_enum_max(A a, B b)
Definition: Meta.h:656
EIGEN_DEVICE_FUNC T * const_cast_ptr(const T *ptr)
Definition: XprHelper.h:553
constexpr unsigned compute_matrix_flags(int Options)
Definition: XprHelper.h:365
constexpr int size_at_compile_time(int rows, int cols)
Definition: XprHelper.h:373
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
Definition: XprHelper.h:63
constexpr int min_size_prefer_fixed(A a, B b)
Definition: Meta.h:683
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, std::enable_if_t< possibly_same_dense< T1, T2 >::value > *=0)
Definition: XprHelper.h:869
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE make_unsigned< IndexType >::type returnUnsignedIndexValue(const IndexType &idx)
Definition: XprHelper.h:23
typename add_const_on_value_type< T >::type add_const_on_value_type_t
Definition: Meta.h:274
constexpr int min_size_prefer_dynamic(A a, B b)
Definition: Meta.h:668
constexpr int compute_default_alignment_helper(int ArrayBytes, int AlignmentBytes)
Definition: XprHelper.h:330
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
squared absolute value
Definition: GlobalFunctions.h:87
const unsigned int NestByRefBit
Definition: Constants.h:173
const int HugeCost
Definition: Constants.h:48
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int DynamicIndex
Definition: Constants.h:30
const int Dynamic
Definition: Constants.h:25
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
r
Definition: UniformPSDSelfTest.py:20
int c
Definition: calibrate.py:100
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
@ S
Definition: quadtree.h:62
t
Definition: plotPSD.py:36
GenericValue< UTF8<> > Value
Value with UTF8 encoding.
Definition: document.h:679
CwiseBinaryOp< internal::scalar_sum_op< double, double >, const CpyMatrixXd, const CpyMatrixXd > XprType
Definition: nestbyvalue.cpp:15
Definition: Constants.h:537
Definition: Constants.h:540
Definition: Constants.h:519
Definition: Constants.h:549
Definition: Constants.h:534
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: TensorMeta.h:47
Definition: Constants.h:528
T ReturnType
Definition: XprHelper.h:1048
T ReturnType
Definition: XprHelper.h:1063
T ReturnType
Definition: XprHelper.h:1069
void ReturnType
Definition: XprHelper.h:1075
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:1043
Definition: Constants.h:552
Definition: Constants.h:522
Definition: Constants.h:558
static constexpr EIGEN_ALWAYS_INLINE Index col(const BlockXprType &xpr, Index c)
Definition: XprHelper.h:980
static constexpr EIGEN_ALWAYS_INLINE Index row(const BlockXprType &xpr, Index r)
Definition: XprHelper.h:977
typename NestedXprHelper::BaseType BaseType
Definition: XprHelper.h:963
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BaseType & base(BlockXprType &xpr)
Definition: XprHelper.h:971
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const BaseType & base(const BlockXprType &xpr)
Definition: XprHelper.h:974
static constexpr bool is_inner_panel(bool inner_panel)
Definition: XprHelper.h:967
Definition: XprHelper.h:941
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const BaseType & base(const XprType &xpr)
Definition: XprHelper.h:953
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BaseType & base(XprType &xpr)
Definition: XprHelper.h:950
static constexpr bool is_inner_panel(bool inner_panel)
Definition: XprHelper.h:946
static constexpr EIGEN_ALWAYS_INLINE Index col(const XprType &, Index c)
Definition: XprHelper.h:955
static constexpr EIGEN_ALWAYS_INLINE Index row(const XprType &, Index r)
Definition: XprHelper.h:954
Definition: XprHelper.h:583
XprType::Scalar CurrentScalarType
Definition: XprHelper.h:584
CastType_::Scalar NewScalarType
Definition: XprHelper.h:586
std::conditional_t< is_same< CurrentScalarType, NewScalarType >::value, const XprType &, CastType > type
Definition: XprHelper.h:587
remove_all_t< CastType > CastType_
Definition: XprHelper.h:585
@ value
Definition: XprHelper.h:339
static EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc &idx)
Definition: XprHelper.h:55
static EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc &idx)
Definition: XprHelper.h:45
Definition: XprHelper.h:35
static EIGEN_DEVICE_FUNC IndexDest run(const IndexSrc &idx)
Definition: XprHelper.h:36
@ value
Definition: XprHelper.h:649
ArrayBase< Derived > type
Definition: XprHelper.h:570
MatrixBase< Derived > type
Definition: XprHelper.h:565
Definition: XprHelper.h:558
const Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & type
Definition: XprHelper.h:460
const Matrix< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & type
Definition: XprHelper.h:455
plain_matrix_type< T >::type type
Definition: XprHelper.h:431
plain_matrix_type< T >::type type
Definition: XprHelper.h:444
plain_matrix_type< T >::type type
Definition: XprHelper.h:449
Definition: XprHelper.h:427
Definition: CoreEvaluators.h:104
find_best_packet_helper< Size, typename unpacket_traits< PacketType >::half >::type type
Definition: XprHelper.h:285
Definition: XprHelper.h:276
Definition: XprHelper.h:289
find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Definition: XprHelper.h:290
typename unpacket_traits< T >::type type
Definition: XprHelper.h:313
typename find_packet_by_size_helper< Size, typename unpacket_traits< PacketType >::half >::type type
Definition: XprHelper.h:303
Definition: XprHelper.h:307
static constexpr bool value
Definition: XprHelper.h:309
typename find_packet_by_size_helper< Size, typename packet_traits< T >::type >::type type
Definition: XprHelper.h:308
Definition: XprHelper.h:263
static constexpr Index Cost
Definition: XprHelper.h:264
Definition: XprHelper.h:205
@ PacketAccess
Definition: XprHelper.h:206
@ Cost
Definition: XprHelper.h:206
@ IsRepeatable
Definition: XprHelper.h:206
dense_xpr_base< Derived, XprKind >::type type
Definition: XprHelper.h:579
Definition: XprHelper.h:575
TriangularShape type
Definition: XprHelper.h:857
Definition: XprHelper.h:854
Definition: ForwardDeclarations.h:31
Definition: XprHelper.h:931
Definition: Meta.h:244
Definition: XprHelper.h:824
@ ret
Definition: XprHelper.h:825
Definition: XprHelper.h:844
@ value
Definition: XprHelper.h:845
Definition: XprHelper.h:819
@ value
Definition: XprHelper.h:820
Definition: XprHelper.h:990
Definition: XprHelper.h:993
Definition: Meta.h:205
Definition: XprHelper.h:69
@ value
Definition: XprHelper.h:70
Definition: XprHelper.h:533
@ CoeffReadCost
Definition: XprHelper.h:536
@ CostNoEval
Definition: XprHelper.h:545
@ NAsInteger
Definition: XprHelper.h:543
@ ScalarReadCost
Definition: XprHelper.h:535
@ Evaluate
Definition: XprHelper.h:546
@ CostEval
Definition: XprHelper.h:544
std::conditional_t< Evaluate, PlainObject, typename ref_selector< T >::type > type
Definition: XprHelper.h:549
remove_all_t< RhsXpr > RhsXprCleaned
Definition: XprHelper.h:246
remove_all_t< LhsXpr > LhsXprCleaned
Definition: XprHelper.h:245
remove_all_t< Func > FuncCleaned
Definition: XprHelper.h:239
remove_all_t< Xpr > XprCleaned
Definition: XprHelper.h:238
remove_all_t< Xpr > XprCleaned
Definition: XprHelper.h:231
remove_all_t< Func > FuncCleaned
Definition: XprHelper.h:232
Definition: XprHelper.h:211
static constexpr Index Cost
Definition: XprHelper.h:212
Definition: GenericPacketMath.h:108
Definition: XprHelper.h:772
std::conditional_t< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixColType, ArrayColType > type
Definition: XprHelper.h:782
Array< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > ArrayColType
Definition: XprHelper.h:778
Matrix< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > MatrixColType
Definition: XprHelper.h:775
Definition: XprHelper.h:801
Array< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > array_type
Definition: XprHelper.h:806
CwiseNullaryOp< scalar_constant_op< Scalar >, const std::conditional_t< is_same< typename traits< Expr >::XprKind, MatrixXpr >::value, matrix_type, array_type > > type
Definition: XprHelper.h:815
Matrix< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > matrix_type
Definition: XprHelper.h:810
@ Options
Definition: XprHelper.h:802
Definition: XprHelper.h:786
std::conditional_t< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType > type
Definition: XprHelper.h:797
Matrix< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > MatrixDiagType
Definition: XprHelper.h:792
Array< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > ArrayDiagType
Definition: XprHelper.h:793
@ diag_size
Definition: XprHelper.h:788
@ max_diag_size
Definition: XprHelper.h:789
plain_matrix_type_dense< T, typename traits< T >::XprKind, traits< T >::Flags >::type type
Definition: XprHelper.h:394
T::PlainObject type
Definition: XprHelper.h:398
T::PlainObject type
Definition: XprHelper.h:403
Definition: XprHelper.h:391
@ MaxCols
Definition: XprHelper.h:495
@ MaxRows
Definition: XprHelper.h:494
Definition: XprHelper.h:389
plain_matrix_type_dense< T, typename traits< T >::XprKind, evaluator< T >::Flags >::type type
Definition: XprHelper.h:469
Definition: XprHelper.h:465
Definition: XprHelper.h:758
std::conditional_t< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType > type
Definition: XprHelper.h:768
Matrix< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > MatrixRowType
Definition: XprHelper.h:761
Array< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > ArrayRowType
Definition: XprHelper.h:764
Definition: XprHelper.h:861
@ value
Definition: XprHelper.h:863
Definition: XprHelper.h:145
std::conditional_t<(sizeof(I1)< sizeof(I2)), I2, I1 > type
Definition: XprHelper.h:146
Definition: XprHelper.h:96
Definition: XprHelper.h:591
Definition: XprHelper.h:506
std::conditional_t< bool(traits< T >::Flags &NestByRefBit), T const &, const T > type
Definition: XprHelper.h:507
std::conditional_t< bool(traits< T >::Flags &NestByRefBit), T &, T > non_const_type
Definition: XprHelper.h:509
Definition: NullaryFunctors.h:21
Definition: XprHelper.h:883
@ value
Definition: XprHelper.h:884
Definition: NullaryFunctors.h:52
Definition: ForwardDeclarations.h:21
Definition: XprHelper.h:514
std::conditional_t< bool(internal::is_const< T1 >::value), add_const_on_value_type_t< T2 >, T2 > type
Definition: XprHelper.h:515
Definition: GenericPacketMath.h:134
Definition: NonLinearOptimization.cpp:97
Definition: datatypes.h:12
Definition: ZVector/PacketMath.h:50