35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_
118 template<
typename MT1
152 template<
typename T1,
typename T2,
typename T3 >
153 struct CanExploitSymmetry {
154 enum { value = IsColumnMajorMatrix<T1>::value &&
155 ( IsSymmetric<T2>::value || IsSymmetric<T3>::value ) };
166 template<
typename T1,
typename T2,
typename T3 >
167 struct IsEvaluationRequired {
168 enum { value = ( evaluateLeft || evaluateRight ) &&
169 !CanExploitSymmetry<T1,T2,T3>::value };
179 template<
typename T1,
typename T2,
typename T3 >
180 struct UseOptimizedKernel {
181 enum { value = !IsDiagonal<T2>::value &&
182 !IsResizable<typename T1::ElementType>::value };
192 template<
typename T1,
typename T2,
typename T3 >
193 struct UseDefaultKernel {
194 enum { value = !UseOptimizedKernel<T1,T2,T3>::value };
224 enum { vectorizable = 0 };
227 enum { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
228 !evaluateRight && MT2::smpAssignable };
271 :(
lhs_.columns() ) ) );
273 if(
lhs_.columns() == 0UL ||
277 ElementType tmp(
lhs_(i,kbegin) *
rhs_(kbegin,j) );
278 for(
size_t k=kbegin+1UL; k<kend; ++k ) {
302 return rhs_.columns();
332 template<
typename T >
334 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
344 template<
typename T >
346 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
356 return lhs_.isAligned();
389 template<
typename MT >
407 DMatSMatMultExpr::selectRowMajorAssignKernel( ~lhs, A, B );
426 template<
typename MT3
430 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
434 for(
size_t i=0UL; i<A.rows(); ++i )
436 for(
size_t j=0UL; j<C.columns(); ++j ) {
440 if( IsDiagonal<MT4>::value )
442 ConstIterator element( B.begin(i) );
443 const ConstIterator
end( B.end(i) );
445 for( ; element!=
end; ++element ) {
446 C(i,element->index()) = A(i,i) * element->value();
451 const size_t jbegin( ( IsUpper<MT4>::value )
452 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
454 const size_t jend( ( IsLower<MT4>::value )
455 ?( IsStrictlyLower<MT4>::value ? i : i+1UL )
459 for(
size_t j=jbegin; j<jend; ++j )
461 ConstIterator element( B.begin(j) );
462 const ConstIterator
end( B.end(j) );
464 for( ; element!=
end; ++element ) {
466 C(i,element->index()) = A(i,j) * element->value();
468 C(i,element->index()) += A(i,j) * element->value();
491 template<
typename MT3
494 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
495 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
499 const size_t ipos( A.rows() & size_t(-4) );
502 for(
size_t i=0UL; i<ipos; i+=4UL )
504 for(
size_t j=0UL; j<C.columns(); ++j ) {
511 const size_t jbegin( ( IsUpper<MT4>::value )
512 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
514 const size_t jend( ( IsLower<MT4>::value )
515 ?( IsStrictlyLower<MT4>::value ? i+3UL : i+4UL )
519 for(
size_t j=jbegin; j<jend; ++j )
521 ConstIterator element( B.begin(j) );
522 const ConstIterator
end( B.end(j) );
524 for( ; element!=
end; ++element ) {
525 C(i ,element->index()) += A(i ,j) * element->value();
526 C(i+1UL,element->index()) += A(i+1UL,j) * element->value();
527 C(i+2UL,element->index()) += A(i+2UL,j) * element->value();
528 C(i+3UL,element->index()) += A(i+3UL,j) * element->value();
533 for(
size_t i=ipos; i<A.rows(); ++i )
535 for(
size_t j=0UL; j<C.columns(); ++j ) {
539 const size_t jbegin( ( IsUpper<MT4>::value )
540 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
542 const size_t jend( ( IsLower<MT4>::value )
543 ?( IsStrictlyLower<MT4>::value ? i : i+1UL )
547 for(
size_t j=jbegin; j<jend; ++j )
549 ConstIterator element( B.begin(j) );
550 const ConstIterator
end( B.end(j) );
552 for( ; element!=
end; ++element ) {
553 C(i,element->index()) += A(i,j) * element->value();
574 template<
typename MT >
575 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
585 LT A(
serial( rhs.lhs_ ) );
586 RT B(
serial( rhs.rhs_ ) );
595 DMatSMatMultExpr::selectColumnMajorAssignKernel( ~lhs, A, B );
614 template<
typename MT3
617 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
618 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
624 for(
size_t j=0UL; j<B.rows(); ++j )
626 if( IsDiagonal<MT4>::value )
628 ConstIterator element( B.begin(j) );
629 const ConstIterator
end( B.end(j) );
631 for( ; element!=
end; ++element ) {
632 C(j,element->index()) = A(j,j) * element->value();
637 const size_t iibegin( ( IsLower<MT4>::value )
638 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
640 const size_t iiend( ( IsUpper<MT4>::value )
641 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
645 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
647 ConstIterator element( B.begin(j) );
648 const ConstIterator
end( B.end(j) );
649 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
651 for( ; element!=
end; ++element ) {
652 for(
size_t i=ii; i<iend; ++i ) {
654 C(i,element->index()) = A(i,j) * element->value();
656 C(i,element->index()) += A(i,j) * element->value();
680 template<
typename MT3
683 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
684 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
690 for(
size_t j=0UL; j<B.rows(); ++j )
692 const size_t iibegin( ( IsLower<MT4>::value )
693 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
695 const size_t iiend( ( IsUpper<MT4>::value )
696 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
700 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
702 ConstIterator element( B.begin(j) );
703 const ConstIterator
end( B.end(j) );
704 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
706 for( ; element!=
end; ++element ) {
707 for(
size_t i=ii; i<iend; ++i ) {
708 C(i,element->index()) += A(i,j) * element->value();
730 template<
typename MT
732 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
737 typedef typename SelectType< SO, OppositeType, ResultType >::Type TmpType;
749 const TmpType tmp(
serial( rhs ) );
770 template<
typename MT >
771 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
781 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
783 else if( IsSymmetric<MT1>::value )
804 template<
typename MT >
812 LT A(
serial( rhs.lhs_ ) );
813 RT B(
serial( rhs.rhs_ ) );
822 DMatSMatMultExpr::selectRowMajorAddAssignKernel( ~lhs, A, B );
841 template<
typename MT3
844 static inline void selectRowMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
850 if( !IsDiagonal<MT4>::value )
852 const size_t ipos( A.rows() & size_t(-4) );
855 for( ; i<ipos; i+=4UL )
857 const size_t jbegin( ( IsUpper<MT4>::value )
858 ?( IsStrictlyUpper<MT4>::value ? i+1U : i )
860 const size_t jend( ( IsLower<MT4>::value )
861 ?( IsStrictlyLower<MT4>::value ? i+3UL : i+4UL )
865 for(
size_t j=jbegin; j<jend; ++j )
867 ConstIterator element( B.begin(j) );
868 const ConstIterator
end( B.end(j) );
870 for( ; element!=
end; ++element ) {
871 C(i ,element->index()) += A(i ,j) * element->value();
872 C(i+1UL,element->index()) += A(i+1UL,j) * element->value();
873 C(i+2UL,element->index()) += A(i+2UL,j) * element->value();
874 C(i+3UL,element->index()) += A(i+3UL,j) * element->value();
880 for( ; i<A.rows(); ++i )
882 if( IsDiagonal<MT4>::value )
884 ConstIterator element( B.begin(i) );
885 const ConstIterator
end( B.end(i) );
887 for( ; element!=
end; ++element ) {
888 C(i,element->index()) += A(i,i) * element->value();
893 const size_t jbegin( ( IsUpper<MT4>::value )
894 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
896 const size_t jend( ( IsLower<MT4>::value )
897 ?( IsStrictlyLower<MT4>::value ? i : i+1UL )
901 for(
size_t j=jbegin; j<jend; ++j )
903 ConstIterator element( B.begin(j) );
904 const ConstIterator
end( B.end(j) );
906 for( ; element!=
end; ++element ) {
907 C(i,element->index()) += A(i,j) * element->value();
929 template<
typename MT >
930 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
940 LT A(
serial( rhs.lhs_ ) );
941 RT B(
serial( rhs.rhs_ ) );
950 DMatSMatMultExpr::selectColumnMajorAddAssignKernel( ~lhs, A, B );
969 template<
typename MT3
972 static inline void selectColumnMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
976 for(
size_t j=0UL; j<B.rows(); ++j )
978 if( IsDiagonal<MT4>::value )
980 ConstIterator element( B.begin(j) );
981 const ConstIterator
end( B.end(j) );
983 for( ; element!=
end; ++element ) {
984 C(j,element->index()) += A(j,j) * element->value();
989 const size_t iibegin( ( IsLower<MT4>::value )
990 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
992 const size_t iiend( ( IsUpper<MT4>::value )
993 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
997 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
999 ConstIterator element( B.begin(j) );
1000 const ConstIterator
end( B.end(j) );
1001 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
1003 for( ; element!=
end; ++element ) {
1004 for(
size_t i=ii; i<iend; ++i ) {
1005 C(i,element->index()) += A(i,j) * element->value();
1030 template<
typename MT >
1031 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1041 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1043 else if( IsSymmetric<MT1>::value )
1068 template<
typename MT >
1076 LT A(
serial( rhs.lhs_ ) );
1077 RT B(
serial( rhs.rhs_ ) );
1086 DMatSMatMultExpr::selectRowMajorSubAssignKernel( ~lhs, A, B );
1105 template<
typename MT3
1108 static inline void selectRowMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1114 if( !IsDiagonal<MT4>::value )
1116 const size_t ipos( A.rows() & size_t(-4) );
1119 for( ; i<ipos; i+=4UL )
1121 const size_t jbegin( ( IsUpper<MT4>::value )
1122 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
1124 const size_t jend( ( IsLower<MT4>::value )
1125 ?( IsStrictlyLower<MT4>::value ? i+3UL : i+4UL )
1129 for(
size_t j=jbegin; j<jend; ++j )
1131 ConstIterator element( B.begin(j) );
1132 const ConstIterator
end( B.end(j) );
1134 for( ; element!=
end; ++element ) {
1135 C(i ,element->index()) -= A(i ,j) * element->value();
1136 C(i+1UL,element->index()) -= A(i+1UL,j) * element->value();
1137 C(i+2UL,element->index()) -= A(i+2UL,j) * element->value();
1138 C(i+3UL,element->index()) -= A(i+3UL,j) * element->value();
1144 for( ; i<A.rows(); ++i )
1146 if( IsDiagonal<MT4>::value )
1148 ConstIterator element( B.begin(i) );
1149 const ConstIterator
end( B.end(i) );
1151 for( ; element!=
end; ++element ) {
1152 C(i,element->index()) -= A(i,i) * element->value();
1157 const size_t jbegin( ( IsUpper<MT4>::value )
1158 ?( IsStrictlyUpper<MT4>::value ? i+1UL : i )
1160 const size_t jend( ( IsLower<MT4>::value )
1161 ?( IsStrictlyLower<MT4>::value ? i : i+1UL )
1165 for(
size_t j=jbegin; j<jend; ++j )
1167 ConstIterator element( B.begin(j) );
1168 const ConstIterator
end( B.end(j) );
1170 for( ; element!=
end; ++element ) {
1171 C(i,element->index()) -= A(i,j) * element->value();
1193 template<
typename MT >
1203 LT A(
serial( rhs.lhs_ ) );
1204 RT B(
serial( rhs.rhs_ ) );
1213 DMatSMatMultExpr::selectColumnMajorSubAssignKernel( ~lhs, A, B );
1232 template<
typename MT3
1235 static inline void selectColumnMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1239 for(
size_t j=0UL; j<B.rows(); ++j )
1241 if( IsDiagonal<MT4>::value )
1243 ConstIterator element( B.begin(j) );
1244 const ConstIterator
end( B.end(j) );
1246 for( ; element!=
end; ++element ) {
1247 C(j,element->index()) -= A(j,j) * element->value();
1252 const size_t iibegin( ( IsLower<MT4>::value )
1253 ?( IsStrictlyLower<MT4>::value ? j+1UL : j )
1255 const size_t iiend( ( IsUpper<MT4>::value )
1256 ?( IsStrictlyUpper<MT4>::value ? j : j+1UL )
1260 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
1262 ConstIterator element( B.begin(j) );
1263 const ConstIterator
end( B.end(j) );
1264 const size_t iend( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
1266 for( ; element!=
end; ++element ) {
1267 for(
size_t i=ii; i<iend; ++i ) {
1268 C(i,element->index()) -= A(i,j) * element->value();
1293 template<
typename MT >
1294 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1304 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1306 else if( IsSymmetric<MT1>::value )
1341 template<
typename MT
1343 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1381 template<
typename MT
1383 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1388 typedef typename SelectType< SO, OppositeType, ResultType >::Type TmpType;
1400 const TmpType tmp( rhs );
1421 template<
typename MT >
1422 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1432 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1434 else if( IsSymmetric<MT1>::value )
1457 template<
typename MT
1459 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1497 template<
typename MT >
1498 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1508 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1510 else if( IsSymmetric<MT1>::value )
1538 template<
typename MT
1540 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1578 template<
typename MT >
1579 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1589 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1591 else if( IsSymmetric<MT1>::value )
1661 template<
typename T1
1663 inline const DMatSMatMultExpr<T1,T2>
1669 throw std::invalid_argument(
"Matrix sizes do not match" );
1686 template<
typename MT1,
typename MT2 >
1704 template<
typename MT1,
typename MT2 >
1706 :
public Columns<MT2>
1722 template<
typename MT1,
typename MT2 >
1724 :
public IsTrue< And< IsLower<MT1>, IsLower<MT2> >::value >
1740 template<
typename MT1,
typename MT2 >
1742 :
public IsTrue< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
1758 template<
typename MT1,
typename MT2 >
1760 :
public IsTrue< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1761 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
1777 template<
typename MT1,
typename MT2 >
1779 :
public IsTrue< And< IsUpper<MT1>, IsUpper<MT2> >::value >
1795 template<
typename MT1,
typename MT2 >
1797 :
public IsTrue< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
1813 template<
typename MT1,
typename MT2 >
1815 :
public IsTrue< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1816 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
1832 template<
typename MT1,
typename MT2,
typename VT >
1837 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1838 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1839 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1840 ,
typename DMatDVecMultExprTrait< MT1, typename SMatDVecMultExprTrait<MT2,VT>::Type >::Type
1841 , INVALID_TYPE >::Type Type;
1850 template<
typename MT1,
typename MT2,
typename VT >
1855 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1856 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1857 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1858 ,
typename DMatSVecMultExprTrait< MT1, typename SMatSVecMultExprTrait<MT2,VT>::Type >::Type
1859 , INVALID_TYPE >::Type Type;
1868 template<
typename VT,
typename MT1,
typename MT2 >
1873 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1874 IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1875 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1876 ,
typename TDVecSMatMultExprTrait< typename TDVecDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1877 , INVALID_TYPE >::Type Type;
1886 template<
typename VT,
typename MT1,
typename MT2 >
1891 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1892 IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1893 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1894 ,
typename TDVecSMatMultExprTrait< typename TDVecDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1895 , INVALID_TYPE >::Type Type;
1904 template<
typename MT1,
typename MT2,
bool AF >
1909 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
1910 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
1919 template<
typename MT1,
typename MT2 >
1924 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1933 template<
typename MT1,
typename MT2 >
1938 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatSMatMultExpr.h:204
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1649
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:373
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:8247
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:105
Header file for basic type definitions.
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSMatMultExpr.h:207
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSMatMultExpr.h:252
const ElementType ReturnType
Return type for expression template evaluations.
Definition: DMatSMatMultExpr.h:206
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:258
SelectType< evaluateRight, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:219
Header file for the IsSparseMatrix type trait.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:209
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:79
Header file for the ColumnExprTrait class template.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:261
Header file for the And class template.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatSMatMultExpr.h:301
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSMatMultExpr.h:355
MT2::ResultType RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:127
Header file for the TDVecSMatMultExprTrait class template.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: DMatSMatMultExpr.h:202
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
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:90
Header file for the IsUniLower type trait.
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:107
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Constraint on the data type.
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:90
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:213
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:372
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatSMatMultExpr.h:291
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the DisableIf class template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
MT1::ResultType RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:126
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#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: StorageOrder.h:161
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
LeftOperand leftOperand() const
Returns the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:311
Header file for the Or class template.
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1602
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
Header file for the Columns type trait.
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSMatMultExpr.h:203
Header file for the DMatDVecMultExprTrait class template.
Header file for the IsLower type trait.
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:129
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:78
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatSMatMultExpr.h:365
Header file for the IsTriangular type trait.
Constraints on the storage order of matrix types.
SelectType< evaluateLeft, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:216
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the serial shim.
#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:165
ResultType::ElementType ElementType
Resulting element type.
Definition: DMatSMatMultExpr.h:205
MT1::CompositeType CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:130
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:128
Base class for all matrix/matrix multiplication expression templates.The MatMatMultExpr class serves ...
Definition: MatMatMultExpr.h:65
EnableIf< IsDenseMatrix< MT1 > >::Type 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 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:116
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: StorageOrder.h:81
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatSMatMultExpr.h:333
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatSMatMultExpr.h:345
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:150
Expression object for dense matrix-sparse matrix multiplications.The DMatSMatMultExpr class represent...
Definition: DMatSMatMultExpr.h:120
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
Header file for the isDefault shim.
Constraint on the data type.
#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:283
MT2::CompositeType CT2
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:131
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
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:210
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:937
Header file for the IsComputation type trait class.
const size_t SMP_DMATSMATMULT_THRESHOLD
SMP row-major dense matrix/row-major sparse matrix multiplication threshold.This threshold specifies ...
Definition: Thresholds.h:926
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.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
#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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
Header file for the IsTrue value trait.
DMatSMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the DMatSMatMultExpr class.
Definition: DMatSMatMultExpr.h:237
Header file for the TSVecDMatMultExprTrait class template.
DMatSMatMultExpr< MT1, MT2 > This
Type of this DMatSMatMultExpr instance.
Definition: DMatSMatMultExpr.h:201
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:79
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849
RightOperand rightOperand() const
Returns the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:321