11#ifndef EIGEN_GENERAL_PRODUCT_H
12#define EIGEN_GENERAL_PRODUCT_H
26#ifndef EIGEN_GEMM_TO_COEFFBASED_THRESHOLD
28#define EIGEN_GEMM_TO_COEFFBASED_THRESHOLD 20
38 #ifndef EIGEN_GPU_COMPILE_PHASE
74 typedef product_type_selector<rows_select, cols_select, depth_select> selector;
81#ifdef EIGEN_DEBUG_PRODUCT
154template<
int S
ide,
int StorageOrder,
bool BlasCompatible>
163template<
typename Scalar,
int Size,
int MaxSize>
169template<
typename Scalar,
int Size>
175template<
typename Scalar,
int Size,
int MaxSize>
182 #if EIGEN_MAX_STATIC_ALIGN_BYTES!=0
190 return ForceAlignment
198template<
int StorageOrder,
bool BlasCompatible>
201 template<
typename Lhs,
typename Rhs,
typename Dest>
213 template<
typename Lhs,
typename Rhs,
typename Dest>
216 typedef typename Lhs::Scalar LhsScalar;
217 typedef typename Rhs::Scalar RhsScalar;
218 typedef typename Dest::Scalar ResScalar;
222 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
224 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
228 ActualLhsType
actualLhs = LhsBlasTraits::extract(lhs);
229 ActualRhsType
actualRhs = RhsBlasTraits::extract(rhs);
272 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
306 template<
typename Lhs,
typename Rhs,
typename Dest>
309 typedef typename Lhs::Scalar LhsScalar;
310 typedef typename Rhs::Scalar RhsScalar;
311 typedef typename Dest::Scalar ResScalar;
314 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
316 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
327 DirectlyUseRhs = ActualRhsTypeCleaned::InnerStrideAtCompileTime==1 || ActualRhsTypeCleaned::MaxSizeAtCompileTime==0
337 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
351 dest.data(),
dest.col(0).innerStride(),
358 template<
typename Lhs,
typename Rhs,
typename Dest>
372 template<
typename Lhs,
typename Rhs,
typename Dest>
395template<
typename Derived>
396template<
typename OtherDerived>
398const Product<Derived, OtherDerived>
406 ProductIsValid = Derived::ColsAtCompileTime==
Dynamic
407 || OtherDerived::RowsAtCompileTime==
Dynamic
408 ||
int(Derived::ColsAtCompileTime)==
int(OtherDerived::RowsAtCompileTime),
409 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
416 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
418 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
420#ifdef EIGEN_DEBUG_PRODUCT
438template<
typename Derived>
439template<
typename OtherDerived>
445 ProductIsValid = Derived::ColsAtCompileTime==
Dynamic
446 || OtherDerived::RowsAtCompileTime==
Dynamic
447 ||
int(Derived::ColsAtCompileTime)==
int(OtherDerived::RowsAtCompileTime),
448 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
455 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
457 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
Definition PacketMath.h:18
int i
Definition BiCGSTAB_step_by_step.cpp:9
#define EIGEN_PLAIN_ENUM_MIN(a, b)
Definition Macros.h:1288
#define eigen_internal_assert(x)
Definition Macros.h:1043
#define EIGEN_DEBUG_VAR(x)
Definition Macros.h:898
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition Macros.h:1302
int data[]
Definition Map_placement_new.cpp:1
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
Definition Memory.h:768
#define EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:174
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:127
int rows
Definition Tutorial_commainit_02.cpp:1
Scalar Scalar int size
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
NumTraits< Scalar >::Real RealScalar
Definition bench_gemm.cpp:47
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:180
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:75
Definition TensorRef.h:81
@ N
Definition constructor.cpp:23
@ AlignedMax
Definition Constants.h:252
@ ColMajor
Definition Constants.h:319
@ RowMajor
Definition Constants.h:321
@ OnTheLeft
Definition Constants.h:332
@ OnTheRight
Definition Constants.h:334
RealScalar alpha
Definition level1_cplx_impl.h:147
DenseIndex ret
Definition level1_cplx_impl.h:44
std::size_t UIntPtr
Definition Meta.h:92
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE ResScalar combine_scalar_factors(const ResScalar &alpha, const Lhs &lhs, const Rhs &rhs)
Definition BlasUtil.h:568
@ Lhs
Definition TensorContractionMapper.h:19
@ Rhs
Definition TensorContractionMapper.h:18
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
@ GemvProduct
Definition Constants.h:500
@ InnerProduct
Definition Constants.h:500
@ CoeffBasedProductMode
Definition Constants.h:500
@ OuterProduct
Definition Constants.h:500
@ GemmProduct
Definition Constants.h:500
@ LazyCoeffBasedProductMode
Definition Constants.h:500
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const int Dynamic
Definition Constants.h:22
@ Small
Definition GeneralProduct.h:18
@ Large
Definition GeneralProduct.h:17
Definition BandTriangularSolver.h:13
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:233
static void run(const Lhs &lhs, const Rhs &rhs, Dest &dest, const typename Dest::Scalar &alpha)
Definition GeneralProduct.h:202
static void run(const Lhs &lhs, const Rhs &rhs, Dest &dest, const typename Dest::Scalar &alpha)
Definition GeneralProduct.h:359
static void run(const Lhs &lhs, const Rhs &rhs, Dest &dest, const typename Dest::Scalar &alpha)
Definition GeneralProduct.h:214
static void run(const Lhs &lhs, const Rhs &rhs, Dest &dest, const typename Dest::Scalar &alpha)
Definition GeneralProduct.h:373
static void run(const Lhs &lhs, const Rhs &rhs, Dest &dest, const typename Dest::Scalar &alpha)
Definition GeneralProduct.h:307
Definition GeneralProduct.h:155
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar * data()
Definition GeneralProduct.h:172
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar * data()
Definition GeneralProduct.h:166
EIGEN_STRONG_INLINE Scalar * data()
Definition GeneralProduct.h:189
Definition GeneralProduct.h:161
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE To run(const From &x)
Definition BlasUtil.h:43
Definition XprHelper.h:458
Definition GenericPacketMath.h:107
Definition DenseStorage.h:45
T array[Size]
Definition DenseStorage.h:46
Definition GeneralProduct.h:36
Definition GeneralProduct.h:33
Definition GeneralProduct.h:52
@ MaxDepth
Definition GeneralProduct.h:60
@ Cols
Definition GeneralProduct.h:59
@ MaxRows
Definition GeneralProduct.h:56
@ Depth
Definition GeneralProduct.h:62
@ MaxCols
Definition GeneralProduct.h:58
@ Rows
Definition GeneralProduct.h:57
@ value
Definition GeneralProduct.h:78
@ ret
Definition GeneralProduct.h:79
remove_all< Lhs >::type _Lhs
Definition GeneralProduct.h:53
remove_all< Rhs >::type _Rhs
Definition GeneralProduct.h:54
Definition ForwardDeclarations.h:17