Eigen  3.4.90 (git rev a4098ac676528a83cfb73d4d26ce1b42ec05f47c)
GeneralProduct.h
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
5// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>
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_GENERAL_PRODUCT_H
12#define EIGEN_GENERAL_PRODUCT_H
13
14#include "./InternalHeaderCheck.h"
15
16namespace Eigen {
17
18enum {
19 Large = 2,
20 Small = 3
21};
22
23// Define the threshold value to fallback from the generic matrix-matrix product
24// implementation (heavy) to the lightweight coeff-based product one.
25// See generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct>
26// in products/GeneralMatrixMatrix.h for more details.
27// TODO This threshold should also be used in the compile-time selector below.
28#ifndef EIGEN_GEMM_TO_COEFFBASED_THRESHOLD
29// This default value has been obtained on a Haswell architecture.
30#define EIGEN_GEMM_TO_COEFFBASED_THRESHOLD 20
31#endif
32
33namespace internal {
34
35template<int Rows, int Cols, int Depth> struct product_type_selector;
36
37template<int Size, int MaxSize> struct product_size_category
38{
39 enum {
40 #ifndef EIGEN_GPU_COMPILE_PHASE
41 is_large = MaxSize == Dynamic ||
42 Size >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD ||
43 (Size==Dynamic && MaxSize>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD),
44 #else
45 is_large = 0,
46 #endif
47 value = is_large ? Large
48 : Size == 1 ? 1
49 : Small
50 };
51};
52
53template<typename Lhs, typename Rhs> struct product_type
54{
55 typedef typename remove_all<Lhs>::type _Lhs;
56 typedef typename remove_all<Rhs>::type _Rhs;
57 enum {
58 MaxRows = traits<_Lhs>::MaxRowsAtCompileTime,
59 Rows = traits<_Lhs>::RowsAtCompileTime,
60 MaxCols = traits<_Rhs>::MaxColsAtCompileTime,
61 Cols = traits<_Rhs>::ColsAtCompileTime,
62 MaxDepth = min_size_prefer_fixed(traits<_Lhs>::MaxColsAtCompileTime,
63 traits<_Rhs>::MaxRowsAtCompileTime),
64 Depth = min_size_prefer_fixed(traits<_Lhs>::ColsAtCompileTime,
65 traits<_Rhs>::RowsAtCompileTime)
66 };
67
68 // the splitting into different lines of code here, introducing the _select enums and the typedef below,
69 // is to work around an internal compiler error with gcc 4.1 and 4.2.
70private:
71 enum {
72 rows_select = product_size_category<Rows,MaxRows>::value,
73 cols_select = product_size_category<Cols,MaxCols>::value,
74 depth_select = product_size_category<Depth,MaxDepth>::value
75 };
76 typedef product_type_selector<rows_select, cols_select, depth_select> selector;
77
78public:
79 enum {
80 value = selector::ret,
81 ret = selector::ret
82 };
83#ifdef EIGEN_DEBUG_PRODUCT
84 static void debug()
85 {
86 EIGEN_DEBUG_VAR(Rows);
87 EIGEN_DEBUG_VAR(Cols);
88 EIGEN_DEBUG_VAR(Depth);
89 EIGEN_DEBUG_VAR(rows_select);
90 EIGEN_DEBUG_VAR(cols_select);
91 EIGEN_DEBUG_VAR(depth_select);
92 EIGEN_DEBUG_VAR(value);
93 }
94#endif
95};
96
97/* The following allows to select the kind of product at compile time
98 * based on the three dimensions of the product.
99 * This is a compile time mapping from {1,Small,Large}^3 -> {product types} */
100// FIXME I'm not sure the current mapping is the ideal one.
101template<int M, int N> struct product_type_selector<M,N,1> { enum { ret = OuterProduct }; };
102template<int M> struct product_type_selector<M, 1, 1> { enum { ret = LazyCoeffBasedProductMode }; };
103template<int N> struct product_type_selector<1, N, 1> { enum { ret = LazyCoeffBasedProductMode }; };
104template<int Depth> struct product_type_selector<1, 1, Depth> { enum { ret = InnerProduct }; };
105template<> struct product_type_selector<1, 1, 1> { enum { ret = InnerProduct }; };
106template<> struct product_type_selector<Small,1, Small> { enum { ret = CoeffBasedProductMode }; };
107template<> struct product_type_selector<1, Small,Small> { enum { ret = CoeffBasedProductMode }; };
108template<> struct product_type_selector<Small,Small,Small> { enum { ret = CoeffBasedProductMode }; };
109template<> struct product_type_selector<Small, Small, 1> { enum { ret = LazyCoeffBasedProductMode }; };
110template<> struct product_type_selector<Small, Large, 1> { enum { ret = LazyCoeffBasedProductMode }; };
111template<> struct product_type_selector<Large, Small, 1> { enum { ret = LazyCoeffBasedProductMode }; };
112template<> struct product_type_selector<1, Large,Small> { enum { ret = CoeffBasedProductMode }; };
113template<> struct product_type_selector<1, Large,Large> { enum { ret = GemvProduct }; };
114template<> struct product_type_selector<1, Small,Large> { enum { ret = CoeffBasedProductMode }; };
115template<> struct product_type_selector<Large,1, Small> { enum { ret = CoeffBasedProductMode }; };
116template<> struct product_type_selector<Large,1, Large> { enum { ret = GemvProduct }; };
117template<> struct product_type_selector<Small,1, Large> { enum { ret = CoeffBasedProductMode }; };
118template<> struct product_type_selector<Small,Small,Large> { enum { ret = GemmProduct }; };
119template<> struct product_type_selector<Large,Small,Large> { enum { ret = GemmProduct }; };
120template<> struct product_type_selector<Small,Large,Large> { enum { ret = GemmProduct }; };
121template<> struct product_type_selector<Large,Large,Large> { enum { ret = GemmProduct }; };
122template<> struct product_type_selector<Large,Small,Small> { enum { ret = CoeffBasedProductMode }; };
123template<> struct product_type_selector<Small,Large,Small> { enum { ret = CoeffBasedProductMode }; };
124template<> struct product_type_selector<Large,Large,Small> { enum { ret = GemmProduct }; };
125
126} // end namespace internal
127
128/***********************************************************************
129* Implementation of Inner Vector Vector Product
130***********************************************************************/
131
132// FIXME : maybe the "inner product" could return a Scalar
133// instead of a 1x1 matrix ??
134// Pro: more natural for the user
135// Cons: this could be a problem if in a meta unrolled algorithm a matrix-matrix
136// product ends up to a row-vector times col-vector product... To tackle this use
137// case, we could have a specialization for Block<MatrixType,1,1> with: operator=(Scalar x);
138
139/***********************************************************************
140* Implementation of Outer Vector Vector Product
141***********************************************************************/
142
143/***********************************************************************
144* Implementation of General Matrix Vector Product
145***********************************************************************/
146
147/* According to the shape/flags of the matrix we have to distinghish 3 different cases:
148 * 1 - the matrix is col-major, BLAS compatible and M is large => call fast BLAS-like colmajor routine
149 * 2 - the matrix is row-major, BLAS compatible and N is large => call fast BLAS-like rowmajor routine
150 * 3 - all other cases are handled using a simple loop along the outer-storage direction.
151 * Therefore we need a lower level meta selector.
152 * Furthermore, if the matrix is the rhs, then the product has to be transposed.
153 */
154namespace internal {
155
156template<int Side, int StorageOrder, bool BlasCompatible>
157struct gemv_dense_selector;
158
159} // end namespace internal
160
161namespace internal {
162
163template<typename Scalar,int Size,int MaxSize,bool Cond> struct gemv_static_vector_if;
164
165template<typename Scalar,int Size,int MaxSize>
166struct gemv_static_vector_if<Scalar,Size,MaxSize,false>
167{
168 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar* data() { eigen_internal_assert(false && "should never be called"); return 0; }
169};
170
171template<typename Scalar,int Size>
172struct gemv_static_vector_if<Scalar,Size,Dynamic,true>
174 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar* data() { return 0; }
175};
176
177template<typename Scalar,int Size,int MaxSize>
178struct gemv_static_vector_if<Scalar,Size,MaxSize,true>
179{
180 enum {
181 ForceAlignment = internal::packet_traits<Scalar>::Vectorizable,
182 PacketSize = internal::packet_traits<Scalar>::size
183 };
184 #if EIGEN_MAX_STATIC_ALIGN_BYTES!=0
185 internal::plain_array<Scalar, internal::min_size_prefer_fixed(Size, MaxSize), 0,
186 internal::plain_enum_min(AlignedMax, PacketSize)> m_data;
187 EIGEN_STRONG_INLINE Scalar* data() { return m_data.array; }
188 #else
189 // Some architectures cannot align on the stack,
190 // => let's manually enforce alignment by allocating more data and return the address of the first aligned element.
191 internal::plain_array<Scalar, internal::min_size_prefer_fixed(Size, MaxSize)+(ForceAlignment?EIGEN_MAX_ALIGN_BYTES:0),0> m_data;
192 EIGEN_STRONG_INLINE Scalar* data() {
193 return ForceAlignment
194 ? reinterpret_cast<Scalar*>((internal::UIntPtr(m_data.array) & ~(std::size_t(EIGEN_MAX_ALIGN_BYTES-1))) + EIGEN_MAX_ALIGN_BYTES)
195 : m_data.array;
196 }
197 #endif
198};
199
200// The vector is on the left => transposition
201template<int StorageOrder, bool BlasCompatible>
202struct gemv_dense_selector<OnTheLeft,StorageOrder,BlasCompatible>
203{
204 template<typename Lhs, typename Rhs, typename Dest>
205 static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)
206 {
207 Transpose<Dest> destT(dest);
208 enum { OtherStorageOrder = StorageOrder == RowMajor ? ColMajor : RowMajor };
209 gemv_dense_selector<OnTheRight,OtherStorageOrder,BlasCompatible>
210 ::run(rhs.transpose(), lhs.transpose(), destT, alpha);
211 }
212};
213
214template<> struct gemv_dense_selector<OnTheRight,ColMajor,true>
215{
216 template<typename Lhs, typename Rhs, typename Dest>
217 static inline void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)
218 {
219 typedef typename Lhs::Scalar LhsScalar;
220 typedef typename Rhs::Scalar RhsScalar;
221 typedef typename Dest::Scalar ResScalar;
222 typedef typename Dest::RealScalar RealScalar;
223
224 typedef internal::blas_traits<Lhs> LhsBlasTraits;
225 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
226 typedef internal::blas_traits<Rhs> RhsBlasTraits;
227 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
228
229 typedef Map<Matrix<ResScalar,Dynamic,1>, plain_enum_min(AlignedMax, internal::packet_traits<ResScalar>::size)> MappedDest;
230
231 ActualLhsType actualLhs = LhsBlasTraits::extract(lhs);
232 ActualRhsType actualRhs = RhsBlasTraits::extract(rhs);
233
234 ResScalar actualAlpha = combine_scalar_factors(alpha, lhs, rhs);
235
236 // make sure Dest is a compile-time vector type (bug 1166)
237 typedef typename conditional<Dest::IsVectorAtCompileTime, Dest, typename Dest::ColXpr>::type ActualDest;
238
239 enum {
240 // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1
241 // on, the other hand it is good for the cache to pack the vector anyways...
242 EvalToDestAtCompileTime = (ActualDest::InnerStrideAtCompileTime==1),
243 ComplexByReal = (NumTraits<LhsScalar>::IsComplex) && (!NumTraits<RhsScalar>::IsComplex),
244 MightCannotUseDest = ((!EvalToDestAtCompileTime) || ComplexByReal) && (ActualDest::MaxSizeAtCompileTime!=0)
245 };
246
247 typedef const_blas_data_mapper<LhsScalar,Index,ColMajor> LhsMapper;
248 typedef const_blas_data_mapper<RhsScalar,Index,RowMajor> RhsMapper;
249 RhsScalar compatibleAlpha = get_factor<ResScalar,RhsScalar>::run(actualAlpha);
250
251 if(!MightCannotUseDest)
252 {
253 // shortcut if we are sure to be able to use dest directly,
254 // this ease the compiler to generate cleaner and more optimzized code for most common cases
255 general_matrix_vector_product
256 <Index,LhsScalar,LhsMapper,ColMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(
257 actualLhs.rows(), actualLhs.cols(),
258 LhsMapper(actualLhs.data(), actualLhs.outerStride()),
259 RhsMapper(actualRhs.data(), actualRhs.innerStride()),
260 dest.data(), 1,
261 compatibleAlpha);
262 }
263 else
264 {
265 gemv_static_vector_if<ResScalar,ActualDest::SizeAtCompileTime,ActualDest::MaxSizeAtCompileTime,MightCannotUseDest> static_dest;
266
267 const bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));
268 const bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;
269
270 ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
271 evalToDest ? dest.data() : static_dest.data());
272
273 if(!evalToDest)
274 {
275 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
276 Index size = dest.size();
277 EIGEN_DENSE_STORAGE_CTOR_PLUGIN
278 #endif
279 if(!alphaIsCompatible)
280 {
281 MappedDest(actualDestPtr, dest.size()).setZero();
282 compatibleAlpha = RhsScalar(1);
283 }
284 else
285 MappedDest(actualDestPtr, dest.size()) = dest;
286 }
287
288 general_matrix_vector_product
289 <Index,LhsScalar,LhsMapper,ColMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(
290 actualLhs.rows(), actualLhs.cols(),
291 LhsMapper(actualLhs.data(), actualLhs.outerStride()),
292 RhsMapper(actualRhs.data(), actualRhs.innerStride()),
293 actualDestPtr, 1,
294 compatibleAlpha);
295
296 if (!evalToDest)
297 {
298 if(!alphaIsCompatible)
299 dest.matrix() += actualAlpha * MappedDest(actualDestPtr, dest.size());
300 else
301 dest = MappedDest(actualDestPtr, dest.size());
302 }
303 }
304 }
305};
306
307template<> struct gemv_dense_selector<OnTheRight,RowMajor,true>
308{
309 template<typename Lhs, typename Rhs, typename Dest>
310 static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)
311 {
312 typedef typename Lhs::Scalar LhsScalar;
313 typedef typename Rhs::Scalar RhsScalar;
314 typedef typename Dest::Scalar ResScalar;
315
316 typedef internal::blas_traits<Lhs> LhsBlasTraits;
317 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
318 typedef internal::blas_traits<Rhs> RhsBlasTraits;
319 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
320 typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
321
322 typename add_const<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);
323 typename add_const<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);
324
325 ResScalar actualAlpha = combine_scalar_factors(alpha, lhs, rhs);
326
327 enum {
328 // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1
329 // on, the other hand it is good for the cache to pack the vector anyways...
330 DirectlyUseRhs = ActualRhsTypeCleaned::InnerStrideAtCompileTime==1 || ActualRhsTypeCleaned::MaxSizeAtCompileTime==0
331 };
332
333 gemv_static_vector_if<RhsScalar,ActualRhsTypeCleaned::SizeAtCompileTime,ActualRhsTypeCleaned::MaxSizeAtCompileTime,!DirectlyUseRhs> static_rhs;
334
335 ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,actualRhs.size(),
336 DirectlyUseRhs ? const_cast<RhsScalar*>(actualRhs.data()) : static_rhs.data());
337
338 if(!DirectlyUseRhs)
339 {
340 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
341 Index size = actualRhs.size();
342 EIGEN_DENSE_STORAGE_CTOR_PLUGIN
343 #endif
344 Map<typename ActualRhsTypeCleaned::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;
345 }
346
347 typedef const_blas_data_mapper<LhsScalar,Index,RowMajor> LhsMapper;
348 typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;
349 general_matrix_vector_product
350 <Index,LhsScalar,LhsMapper,RowMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(
351 actualLhs.rows(), actualLhs.cols(),
352 LhsMapper(actualLhs.data(), actualLhs.outerStride()),
353 RhsMapper(actualRhsPtr, 1),
354 dest.data(), dest.col(0).innerStride(), //NOTE if dest is not a vector at compile-time, then dest.innerStride() might be wrong. (bug 1166)
355 actualAlpha);
356 }
357};
358
359template<> struct gemv_dense_selector<OnTheRight,ColMajor,false>
360{
361 template<typename Lhs, typename Rhs, typename Dest>
362 static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)
363 {
364 EIGEN_STATIC_ASSERT((!nested_eval<Lhs,1>::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE);
365 // TODO if rhs is large enough it might be beneficial to make sure that dest is sequentially stored in memory, otherwise use a temp
366 typename nested_eval<Rhs,1>::type actual_rhs(rhs);
367 const Index size = rhs.rows();
368 for(Index k=0; k<size; ++k)
369 dest += (alpha*actual_rhs.coeff(k)) * lhs.col(k);
370 }
371};
372
373template<> struct gemv_dense_selector<OnTheRight,RowMajor,false>
374{
375 template<typename Lhs, typename Rhs, typename Dest>
376 static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)
377 {
378 EIGEN_STATIC_ASSERT((!nested_eval<Lhs,1>::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE);
379 typename nested_eval<Rhs,Lhs::RowsAtCompileTime>::type actual_rhs(rhs);
380 const Index rows = dest.rows();
381 for(Index i=0; i<rows; ++i)
382 dest.coeffRef(i) += alpha * (lhs.row(i).cwiseProduct(actual_rhs.transpose())).sum();
383 }
384};
385
386} // end namespace internal
387
388/***************************************************************************
389* Implementation of matrix base methods
390***************************************************************************/
391
398template<typename Derived>
399template<typename OtherDerived>
400EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
401const Product<Derived, OtherDerived>
403{
404 // A note regarding the function declaration: In MSVC, this function will sometimes
405 // not be inlined since DenseStorage is an unwindable object for dynamic
406 // matrices and product types are holding a member to store the result.
407 // Thus it does not help tagging this function with EIGEN_STRONG_INLINE.
408 enum {
409 ProductIsValid = Derived::ColsAtCompileTime==Dynamic
410 || OtherDerived::RowsAtCompileTime==Dynamic
411 || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),
412 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
413 SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)
414 };
415 // note to the lost user:
416 // * for a dot product use: v1.dot(v2)
417 // * for a coeff-wise product use: v1.cwiseProduct(v2)
418 EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),
419 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
420 EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),
421 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
422 EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
423#ifdef EIGEN_DEBUG_PRODUCT
424 internal::product_type<Derived,OtherDerived>::debug();
425#endif
426
427 return Product<Derived, OtherDerived>(derived(), other.derived());
428}
429
441template<typename Derived>
442template<typename OtherDerived>
443EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
446{
447 enum {
448 ProductIsValid = Derived::ColsAtCompileTime==Dynamic
449 || OtherDerived::RowsAtCompileTime==Dynamic
450 || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),
451 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
452 SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)
453 };
454 // note to the lost user:
455 // * for a dot product use: v1.dot(v2)
456 // * for a coeff-wise product use: v1.cwiseProduct(v2)
457 EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),
458 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
459 EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),
460 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
461 EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
462
463 return Product<Derived,OtherDerived,LazyProduct>(derived(), other.derived());
464}
465
466} // end namespace Eigen
467
468#endif // EIGEN_PRODUCT_H
internal::traits< Homogeneous< MatrixType, Direction_ > >::Scalar Scalar
Definition: DenseBase.h:61
Derived & derived()
Definition: EigenBase.h:48
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
Definition: GeneralProduct.h:445
const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
Definition: GeneralProduct.h:402
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:77
@ ColMajor
Definition: Constants.h:321
@ RowMajor
Definition: Constants.h:323
@ OnTheLeft
Definition: Constants.h:334
@ OnTheRight
Definition: Constants.h:336
Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:59
const int Dynamic
Definition: Constants.h:24