35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_
125 template<
typename MT1
158 template<
typename T1,
typename T2,
typename T3 >
159 struct CanExploitSymmetry {
160 enum :
bool { value = ( IsSymmetric<T2>::value || IsSymmetric<T3>::value ) };
171 template<
typename T1,
typename T2,
typename T3 >
172 struct IsEvaluationRequired {
173 enum :
bool { value = ( evaluateLeft || evaluateRight ) &&
174 !CanExploitSymmetry<T1,T2,T3>::value };
184 template<
typename T1,
typename T2,
typename T3 >
185 struct UseOptimizedKernel {
187 !IsDiagonal<T2>::value &&
188 !IsResizable< ElementType_<T1> >::value };
198 template<
typename T1,
typename T2,
typename T3 >
199 struct UseDefaultKernel {
200 enum :
bool { value = !UseOptimizedKernel<T1,T2,T3>::value };
230 enum :
bool { simdEnabled =
false };
233 enum :
bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
234 !evaluateRight && MT2::smpAssignable };
284 :(
lhs_.columns() ) ) );
288 const size_t n(
end - begin );
306 inline ReturnType
at(
size_t i,
size_t j )
const {
307 if( i >=
lhs_.rows() ) {
310 if( j >=
rhs_.columns() ) {
322 inline size_t rows() const noexcept {
333 return rhs_.columns();
363 template<
typename T >
364 inline bool canAlias(
const T* alias )
const noexcept {
365 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
375 template<
typename T >
376 inline bool isAliased(
const T* alias )
const noexcept {
377 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
387 return lhs_.isAligned();
397 return (
rows() *
columns() >= SMP_DMATSMATMULT_THRESHOLD );
420 template<
typename MT
440 DMatSMatMultExpr::selectAssignKernel( ~lhs, A, B );
456 template<
typename MT3
459 static inline void selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
461 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
462 selectSmallAssignKernel( C, A, B );
464 selectLargeAssignKernel( C, A, B );
483 template<
typename MT3
486 static inline void selectDefaultAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
492 for(
size_t j=0UL; j<B.rows(); ++j )
494 if( IsDiagonal<MT4>::value )
496 ConstIterator element( B.begin(j) );
497 const ConstIterator
end( B.end(j) );
499 for( ; element!=
end; ++element ) {
500 C(j,element->index()) = A(j,j) * element->value();
505 const size_t iibegin( ( IsLower<MT4>::value )
506 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
508 const size_t iiend( ( IsUpper<MT4>::value )
509 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
513 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
515 ConstIterator element( B.begin(j) );
516 const ConstIterator
end( B.end(j) );
517 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
519 for( ; element!=
end; ++element ) {
520 for(
size_t i=ii; i<iend; ++i ) {
522 C(i,element->index()) = A(i,j) * element->value();
524 C(i,element->index()) += A(i,j) * element->value();
547 template<
typename MT3
550 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
551 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
553 selectDefaultAssignKernel( C, A, B );
573 template<
typename MT3
576 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
577 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
583 for(
size_t j=0UL; j<B.rows(); ++j )
585 const size_t iibegin( ( IsLower<MT4>::value )
586 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
588 const size_t iiend( ( IsUpper<MT4>::value )
589 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
593 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
595 ConstIterator element( B.begin(j) );
596 const ConstIterator
end( B.end(j) );
597 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
599 for( ; element!=
end; ++element ) {
600 for(
size_t i=ii; i<iend; ++i ) {
601 C(i,element->index()) += A(i,j) * element->value();
623 template<
typename MT3
626 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
627 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
629 selectDefaultAssignKernel( C, A, B );
649 template<
typename MT3
652 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
653 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
657 const OppositeType_<MT5> tmp(
serial( B ) );
658 assign( C, A * tmp );
676 template<
typename MT
678 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
683 typedef IfTrue_< SO, OppositeType, ResultType > TmpType;
695 const TmpType tmp(
serial( rhs ) );
716 template<
typename MT
718 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
728 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
729 assign( ~lhs,
trans( rhs.lhs_ ) *
trans( rhs.rhs_ ) );
730 else if( IsSymmetric<MT1>::value )
731 assign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
733 assign( ~lhs, rhs.lhs_ *
trans( rhs.rhs_ ) );
751 template<
typename MT
753 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
761 LT A(
serial( rhs.lhs_ ) );
762 RT B(
serial( rhs.rhs_ ) );
771 DMatSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
787 template<
typename MT3
790 static inline void selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
792 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
793 selectSmallAddAssignKernel( C, A, B );
795 selectLargeAddAssignKernel( C, A, B );
814 template<
typename MT3
817 static inline void selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
821 for(
size_t j=0UL; j<B.rows(); ++j )
823 if( IsDiagonal<MT4>::value )
825 ConstIterator element( B.begin(j) );
826 const ConstIterator
end( B.end(j) );
828 for( ; element!=
end; ++element ) {
829 C(j,element->index()) += A(j,j) * element->value();
834 const size_t iibegin( ( IsLower<MT4>::value )
835 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
837 const size_t iiend( ( IsUpper<MT4>::value )
838 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
842 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
844 ConstIterator element( B.begin(j) );
845 const ConstIterator
end( B.end(j) );
846 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
848 for( ; element!=
end; ++element ) {
849 for(
size_t i=ii; i<iend; ++i ) {
850 C(i,element->index()) += A(i,j) * element->value();
874 template<
typename MT3
877 static inline void selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
881 const OppositeType_<MT5> tmp(
serial( B ) );
882 addAssign( C, A * tmp );
902 template<
typename MT
904 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
914 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
915 addAssign( ~lhs,
trans( rhs.lhs_ ) *
trans( rhs.rhs_ ) );
916 else if( IsSymmetric<MT1>::value )
917 addAssign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
919 addAssign( ~lhs, rhs.lhs_ *
trans( rhs.rhs_ ) );
941 template<
typename MT
943 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
951 LT A(
serial( rhs.lhs_ ) );
952 RT B(
serial( rhs.rhs_ ) );
961 DMatSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
977 template<
typename MT3
980 static inline void selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
982 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
983 selectSmallSubAssignKernel( C, A, B );
985 selectLargeSubAssignKernel( C, A, B );
1004 template<
typename MT3
1007 static inline void selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1011 for(
size_t j=0UL; j<B.rows(); ++j )
1013 if( IsDiagonal<MT4>::value )
1015 ConstIterator element( B.begin(j) );
1016 const ConstIterator
end( B.end(j) );
1018 for( ; element!=
end; ++element ) {
1019 C(j,element->index()) -= A(j,j) * element->value();
1024 const size_t iibegin( ( IsLower<MT4>::value )
1025 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
1027 const size_t iiend( ( IsUpper<MT4>::value )
1028 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
1032 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
1034 ConstIterator element( B.begin(j) );
1035 const ConstIterator
end( B.end(j) );
1036 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
1038 for( ; element!=
end; ++element ) {
1039 for(
size_t i=ii; i<iend; ++i ) {
1040 C(i,element->index()) -= A(i,j) * element->value();
1064 template<
typename MT3
1067 static inline void selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1071 const OppositeType_<MT5> tmp(
serial( B ) );
1072 subAssign( C, A * tmp );
1092 template<
typename MT
1094 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1104 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1105 subAssign( ~lhs,
trans( rhs.lhs_ ) *
trans( rhs.rhs_ ) );
1106 else if( IsSymmetric<MT1>::value )
1107 subAssign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
1109 subAssign( ~lhs, rhs.lhs_ *
trans( rhs.rhs_ ) );
1141 template<
typename MT
1143 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1181 template<
typename MT
1183 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1188 typedef IfTrue_< SO, OppositeType, ResultType > TmpType;
1200 const TmpType tmp( rhs );
1221 template<
typename MT
1223 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1233 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1235 else if( IsSymmetric<MT1>::value )
1258 template<
typename MT
1260 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1298 template<
typename MT
1300 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1310 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1312 else if( IsSymmetric<MT1>::value )
1340 template<
typename MT
1342 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1380 template<
typename MT
1382 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1392 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1394 else if( IsSymmetric<MT1>::value )
1464 template<
typename T1
1466 inline const DMatSMatMultExpr<T1,T2>
1490 template<
typename MT1,
typename MT2 >
1507 template<
typename MT1,
typename MT2 >
1524 template<
typename MT1,
typename MT2 >
1542 template<
typename MT1,
typename MT2 >
1544 :
public BoolConstant< And< IsLower<MT1>, IsLower<MT2> >::value >
1560 template<
typename MT1,
typename MT2 >
1562 :
public BoolConstant< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
1578 template<
typename MT1,
typename MT2 >
1580 :
public BoolConstant< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1581 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
1597 template<
typename MT1,
typename MT2 >
1599 :
public BoolConstant< And< IsUpper<MT1>, IsUpper<MT2> >::value >
1615 template<
typename MT1,
typename MT2 >
1617 :
public BoolConstant< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
1633 template<
typename MT1,
typename MT2 >
1635 :
public BoolConstant< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1636 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
1652 template<
typename MT1,
typename MT2,
typename VT >
1657 using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
1658 , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
1659 , IsDenseVector<VT>, IsColumnVector<VT> >
1660 , DMatDVecMultExprTrait_< MT1, SMatDVecMultExprTrait_<MT2,VT> >
1670 template<
typename MT1,
typename MT2,
typename VT >
1675 using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
1676 , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
1677 , IsSparseVector<VT>, IsColumnVector<VT> >
1678 , DMatSVecMultExprTrait_< MT1, SMatSVecMultExprTrait_<MT2,VT> >
1688 template<
typename VT,
typename MT1,
typename MT2 >
1693 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
1694 , IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
1695 , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2> >
1696 , TDVecSMatMultExprTrait_< TDVecDMatMultExprTrait_<VT,MT1>, MT2 >
1706 template<
typename VT,
typename MT1,
typename MT2 >
1711 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
1712 , IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
1713 , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2> >
1714 , TDVecSMatMultExprTrait_< TDVecDMatMultExprTrait_<VT,MT1>, MT2 >
1724 template<
typename MT1,
typename MT2,
bool AF >
1729 using Type = MultExprTrait_< SubmatrixExprTrait_<const MT1,AF>
1730 , SubmatrixExprTrait_<const MT2,AF> >;
1739 template<
typename MT1,
typename MT2 >
1744 using Type = MultExprTrait_< RowExprTrait_<const MT1>, MT2 >;
1753 template<
typename MT1,
typename MT2 >
1758 using Type = MultExprTrait_< MT1, ColumnExprTrait_<const MT2> >;
ResultType_< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:133
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Header file for mathematical functions.
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:404
Header file for the SMatDVecMultExprTrait class template.
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7800
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:87
Header file for basic type definitions.
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSMatMultExpr.h:213
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSMatMultExpr.h:258
const ElementType ReturnType
Return type for expression template evaluations.
Definition: DMatSMatMultExpr.h:212
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:222
ElementType_< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:135
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
Header file for the IsDiagonal type trait.
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Header file for the ColumnExprTrait class template.
If_< IsExpression< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:219
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatSMatMultExpr.h:396
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Header file for the IsRowVector type trait.
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSMatMultExpr.h:386
Header file for the TDVecSMatMultExprTrait class template.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSMatMultExpr.h:322
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Constraints on the storage order of matrix types.
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1716
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
CompositeType_< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:138
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:109
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSMatMultExpr.h:210
DMatSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatSMatMultExpr class.
Definition: DMatSMatMultExpr.h:243
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DMatSMatMultExpr.h:211
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Constraint on the data type.
Constraint on the data type.
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
SubvectorExprTrait_< VT, unaligned > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:152
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSMatMultExpr.h:364
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:403
Header file for the DisableIf class template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
ElementType_< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:136
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Header file for the Or class template.
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSMatMultExpr.h:332
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:342
Header file for the DMatDVecMultExprTrait class template.
CompositeType_< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:137
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
If_< IsExpression< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:216
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSMatMultExpr.h:376
Header file for the SMatSVecMultExprTrait class template.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
Header file for the IsTriangular type trait.
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:254
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSMatMultExpr.h:209
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/matrix ...
Definition: MatMatMultExpr.h:109
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
Base class for all matrix/matrix multiplication expression templates.The MatMatMultExpr class serves ...
Definition: MatMatMultExpr.h:65
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSMatMultExpr.h:306
Header file for the IsSparseVector type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the SubmatrixExprTrait class template.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for run time assertion macros.
Utility type for generic codes.
Expression object for dense matrix-sparse matrix multiplications.The DMatSMatMultExpr class represent...
Definition: DMatSMatMultExpr.h:127
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the reset shim.
ResultType_< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:134
Header file for the isDefault shim.
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DMatSMatMultExpr.h:208
Constraint on the data type.
Constraints on the storage order of matrix types.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:352
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
Header file for the IsDenseVector type trait.
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
Header file for the IsRowMajorMatrix type trait.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
Header file for the IsComputation type trait class.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Header file for the TDVecDMatMultExprTrait class template.
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:225
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
Header file for the IntegralConstant class template.
Header file for the TSVecDMatMultExprTrait class template.
DMatSMatMultExpr< MT1, MT2 > This
Type of this DMatSMatMultExpr instance.
Definition: DMatSMatMultExpr.h:207
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the DMatSVecMultExprTrait class template.
Header file for the IsColumnVector type trait.
Constraint on the data type.
Header file for the IsResizable type trait.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.