32 InnerMaxSize = int(Derived::IsRowMajor)
33 ? Derived::MaxColsAtCompileTime
34 : Derived::MaxRowsAtCompileTime
38 MightVectorize = (int(Derived::Flags)&ActualPacketAccessBit)
40 MayLinearVectorize = MightVectorize && (int(Derived::Flags)&
LinearAccessBit),
46 Traversal = int(MayLinearVectorize) ? int(LinearVectorizedTraversal)
48 : int(DefaultTraversal)
53 Cost = Derived::SizeAtCompileTime == Dynamic ? HugeCost
55 UnrollingLimit = EIGEN_UNROLLING_LIMIT * (
int(Traversal) == int(DefaultTraversal) ? 1 : int(PacketSize))
60 Unrolling = Cost <= UnrollingLimit ? CompleteUnrolling : NoUnrolling
63#ifdef EIGEN_DEBUG_ASSIGN
66 std::cerr <<
"Xpr: " <<
typeid(
typename Derived::XprType).name() << std::endl;
67 std::cerr.setf(std::ios::hex, std::ios::basefield);
68 EIGEN_DEBUG_VAR(Derived::Flags)
69 std::cerr.unsetf(std::ios::hex);
70 EIGEN_DEBUG_VAR(InnerMaxSize)
71 EIGEN_DEBUG_VAR(PacketSize)
72 EIGEN_DEBUG_VAR(MightVectorize)
73 EIGEN_DEBUG_VAR(MayLinearVectorize)
75 EIGEN_DEBUG_VAR(Traversal)
76 EIGEN_DEBUG_VAR(UnrollingLimit)
77 EIGEN_DEBUG_VAR(Unrolling)
78 std::cerr << std::endl;
110 outer = Start / Derived::InnerSizeAtCompileTime,
111 inner = Start % Derived::InnerSizeAtCompileTime
114 typedef typename Derived::Scalar Scalar;
117 static EIGEN_STRONG_INLINE Scalar run(
const Derived &
mat,
const Func&)
119 return mat.coeffByOuterInner(outer, inner);
160 outer = index / int(Derived::InnerSizeAtCompileTime),
161 inner = index % int(Derived::InnerSizeAtCompileTime),
162 alignment = Derived::Alignment
165 typedef typename Derived::Scalar Scalar;
166 typedef typename packet_traits<Scalar>::type PacketScalar;
168 static EIGEN_STRONG_INLINE PacketScalar run(
const Derived &
mat,
const Func&)
185struct redux_impl<Func, Derived, DefaultTraversal, NoUnrolling>
187 typedef typename Derived::Scalar Scalar;
189 static EIGEN_STRONG_INLINE Scalar run(
const Derived &
mat,
const Func& func)
191 eigen_assert(
mat.rows()>0 &&
mat.cols()>0 &&
"you are using an empty matrix");
193 res =
mat.coeffByOuterInner(0, 0);
194 for(Index i = 1; i <
mat.innerSize(); ++i)
195 res = func(res,
mat.coeffByOuterInner(0, i));
196 for(Index i = 1; i <
mat.outerSize(); ++i)
197 for(Index
j = 0;
j <
mat.innerSize(); ++
j)
198 res = func(res,
mat.coeffByOuterInner(i,
j));
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:124
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array.
Definition Constants.h:149