35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSMATTDMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSMATTDMATMULTEXPR_H_
118 template<
typename MT1
120 class TSMatTDMatMultExpr :
public DenseMatrix< TSMatTDMatMultExpr<MT1,MT2>, true >
121 ,
private MatMatMultExpr
122 ,
private Computation
151 template<
typename T1,
typename T2,
typename T3 >
152 struct CanExploitSymmetry {
153 enum { value = ( IsSymmetric<T2>::value || IsSymmetric<T3>::value ) };
164 template<
typename T1,
typename T2,
typename T3 >
165 struct IsEvaluationRequired {
166 enum { value = ( evaluateLeft || evaluateRight ) &&
167 !CanExploitSymmetry<T1,T2,T3>::value };
178 template<
typename T1,
typename T2,
typename T3 >
179 struct UseOptimizedKernel {
180 enum { value = !IsDiagonal<T3>::value &&
181 !IsResizable<typename T1::ElementType>::value &&
182 !IsResizable<ET1>::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 rhs_.isAligned();
389 template<
typename MT
399 LT A(
serial( rhs.lhs_ ) );
400 RT B(
serial( rhs.rhs_ ) );
409 TSMatTDMatMultExpr::selectAssignKernel( ~lhs, A, B );
429 template<
typename MT3
433 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
441 for(
size_t i=0UL; i<A.columns(); ++i )
443 const ConstIterator
end( A.end(i) );
444 ConstIterator element( A.begin(i) );
446 for( ; element!=
end; ++element ) {
447 C(element->index(),i) = element->value() * B(i,i);
453 const size_t block( 64UL );
455 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
457 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
459 for(
size_t i=0UL; i<A.columns(); ++i )
461 const ConstIterator
end( A.end(i) );
462 ConstIterator element( A.begin(i) );
464 const size_t jbegin( ( IsUpper<MT5>::value )
465 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
467 const size_t jend( ( IsLower<MT5>::value )
468 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
474 for( ; element!=
end; ++element ) {
475 for(
size_t j=jbegin; j<jend; ++j ) {
477 C(element->index(),j) = element->value() * B(i,j);
479 C(element->index(),j) += element->value() * B(i,j);
504 template<
typename MT3
507 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
508 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
512 const size_t block( IsRowMajorMatrix<MT3>::value ? 128UL : 64UL );
514 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
516 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
518 for(
size_t i=0UL; i<A.rows(); ++i ) {
519 for(
size_t j=jj; j<jpos; ++j ) {
524 for(
size_t i=0UL; i<A.columns(); ++i )
526 const size_t jbegin( ( IsUpper<MT5>::value )
527 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
529 const size_t jend( ( IsLower<MT5>::value )
530 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
536 const ConstIterator
end( A.end(i) );
537 ConstIterator element( A.begin(i) );
539 const size_t nonzeros( A.nonZeros(i) );
540 const size_t kpos( nonzeros &
size_t(-4) );
543 for(
size_t k=0UL; k<kpos; k+=4UL )
545 const size_t i1( element->index() );
546 const ET1 v1( element->value() );
548 const size_t i2( element->index() );
549 const ET1 v2( element->value() );
551 const size_t i3( element->index() );
552 const ET1 v3( element->value() );
554 const size_t i4( element->index() );
555 const ET1 v4( element->value() );
560 for(
size_t j=jbegin; j<jend; ++j ) {
561 C(i1,j) += v1 * B(i,j);
562 C(i2,j) += v2 * B(i,j);
563 C(i3,j) += v3 * B(i,j);
564 C(i4,j) += v4 * B(i,j);
568 for( ; element!=
end; ++element ) {
569 for(
size_t j=jbegin; j<jend; ++j ) {
570 C(element->index(),j) += element->value() * B(i,j);
592 template<
typename MT
594 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
599 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
611 const TmpType tmp(
serial( rhs ) );
632 template<
typename MT >
633 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
643 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
645 else if( IsSymmetric<MT1>::value )
668 template<
typename MT >
669 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
677 if( IsSymmetric<MT1>::value )
698 template<
typename MT
700 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
708 LT A(
serial( rhs.lhs_ ) );
709 RT B(
serial( rhs.rhs_ ) );
718 TSMatTDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
737 template<
typename MT3
740 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
741 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
745 if( IsDiagonal<MT5>::value )
747 for(
size_t i=0UL; i<A.columns(); ++i )
749 const ConstIterator
end( A.end(i) );
750 ConstIterator element( A.begin(i) );
752 for( ; element!=
end; ++element ) {
753 C(element->index(),i) += element->value() * B(i,i);
759 const size_t block( 64UL );
761 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
763 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
765 for(
size_t i=0UL; i<A.columns(); ++i )
767 const ConstIterator
end( A.end(i) );
768 ConstIterator element( A.begin(i) );
770 const size_t jbegin( ( IsUpper<MT5>::value )
771 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
773 const size_t jend( ( IsLower<MT5>::value )
774 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
780 for( ; element!=
end; ++element ) {
781 for(
size_t j=jbegin; j<jend; ++j ) {
782 C(element->index(),j) += element->value() * B(i,j);
806 template<
typename MT3
809 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
810 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
814 const size_t block( IsRowMajorMatrix<MT3>::value ? 128UL : 64UL );
816 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
818 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
820 for(
size_t i=0UL; i<A.columns(); ++i )
822 const size_t jbegin( ( IsUpper<MT5>::value )
823 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
825 const size_t jend( ( IsLower<MT5>::value )
826 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
832 const ConstIterator
end( A.end(i) );
833 ConstIterator element( A.begin(i) );
835 const size_t nonzeros( A.nonZeros(i) );
836 const size_t kpos( nonzeros &
size_t(-4) );
839 for(
size_t k=0UL; k<kpos; k+=4UL )
841 const size_t i1( element->index() );
842 const ET1 v1( element->value() );
844 const size_t i2( element->index() );
845 const ET1 v2( element->value() );
847 const size_t i3( element->index() );
848 const ET1 v3( element->value() );
850 const size_t i4( element->index() );
851 const ET1 v4( element->value() );
856 for(
size_t j=jbegin; j<jend; ++j ) {
857 C(i1,j) += v1 * B(i,j);
858 C(i2,j) += v2 * B(i,j);
859 C(i3,j) += v3 * B(i,j);
860 C(i4,j) += v4 * B(i,j);
864 for( ; element!=
end; ++element ) {
865 for(
size_t j=jbegin; j<jend; ++j ) {
866 C(element->index(),j) += element->value() * B(i,j);
890 template<
typename MT >
891 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
901 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
903 else if( IsSymmetric<MT1>::value )
926 template<
typename MT >
927 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
935 if( IsSymmetric<MT1>::value )
960 template<
typename MT
962 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
970 LT A(
serial( rhs.lhs_ ) );
971 RT B(
serial( rhs.rhs_ ) );
980 TSMatTDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
999 template<
typename MT3
1002 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
1003 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1007 if( IsDiagonal<MT5>::value )
1009 for(
size_t i=0UL; i<A.columns(); ++i )
1011 const ConstIterator
end( A.end(i) );
1012 ConstIterator element( A.begin(i) );
1014 for( ; element!=
end; ++element ) {
1015 C(element->index(),i) -= element->value() * B(i,i);
1021 const size_t block( 64UL );
1023 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1025 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1027 for(
size_t i=0UL; i<A.columns(); ++i )
1029 const ConstIterator
end( A.end(i) );
1030 ConstIterator element( A.begin(i) );
1032 const size_t jbegin( ( IsUpper<MT5>::value )
1033 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
1035 const size_t jend( ( IsLower<MT5>::value )
1036 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
1039 if( jbegin >= jend )
1042 for( ; element!=
end; ++element ) {
1043 for(
size_t j=jbegin; j<jend; ++j ) {
1044 C(element->index(),j) -= element->value() * B(i,j);
1068 template<
typename MT3
1071 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1072 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1076 const size_t block( IsRowMajorMatrix<MT3>::value ? 128UL : 64UL );
1078 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1080 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1082 for(
size_t i=0UL; i<A.columns(); ++i )
1084 const size_t jbegin( ( IsUpper<MT5>::value )
1085 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
1087 const size_t jend( ( IsLower<MT5>::value )
1088 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
1091 if( jbegin >= jend )
1094 const ConstIterator
end( A.end(i) );
1095 ConstIterator element( A.begin(i) );
1097 const size_t nonzeros( A.nonZeros(i) );
1098 const size_t kpos( nonzeros &
size_t(-4) );
1101 for(
size_t k=0UL; k<kpos; k+=4UL )
1103 const size_t i1( element->index() );
1104 const ET1 v1( element->value() );
1106 const size_t i2( element->index() );
1107 const ET1 v2( element->value() );
1109 const size_t i3( element->index() );
1110 const ET1 v3( element->value() );
1112 const size_t i4( element->index() );
1113 const ET1 v4( element->value() );
1118 for(
size_t j=jbegin; j<jend; ++j ) {
1119 C(i1,j) -= v1 * B(i,j);
1120 C(i2,j) -= v2 * B(i,j);
1121 C(i3,j) -= v3 * B(i,j);
1122 C(i4,j) -= v4 * B(i,j);
1126 for( ; element!=
end; ++element ) {
1127 for(
size_t j=jbegin; j<jend; ++j ) {
1128 C(element->index(),j) -= element->value() * B(i,j);
1153 template<
typename MT >
1154 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1164 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1166 else if( IsSymmetric<MT1>::value )
1190 template<
typename MT >
1191 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1199 if( IsSymmetric<MT1>::value )
1235 template<
typename MT
1237 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1276 template<
typename MT
1278 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1283 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
1295 const TmpType tmp( rhs );
1316 template<
typename MT >
1317 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1327 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1329 else if( IsSymmetric<MT1>::value )
1352 template<
typename MT >
1353 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1363 if( IsSymmetric<MT1>::value )
1387 template<
typename MT
1389 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1428 template<
typename MT >
1429 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1439 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1441 else if( IsSymmetric<MT1>::value )
1465 template<
typename MT >
1466 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1474 if( IsSymmetric<MT1>::value )
1502 template<
typename MT
1504 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1543 template<
typename MT >
1544 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1554 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1556 else if( IsSymmetric<MT1>::value )
1580 template<
typename MT >
1581 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1589 if( IsSymmetric<MT1>::value )
1659 template<
typename T1
1661 inline const TSMatTDMatMultExpr<T1,T2>
1667 throw std::invalid_argument(
"Matrix sizes do not match" );
1684 template<
typename MT1,
typename MT2 >
1702 template<
typename MT1,
typename MT2 >
1704 :
public Columns<MT2>
1720 template<
typename MT1,
typename MT2 >
1722 :
public IsTrue< And< IsLower<MT1>, IsLower<MT2> >::value >
1738 template<
typename MT1,
typename MT2 >
1740 :
public IsTrue< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
1756 template<
typename MT1,
typename MT2 >
1758 :
public IsTrue< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1759 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
1775 template<
typename MT1,
typename MT2 >
1777 :
public IsTrue< And< IsUpper<MT1>, IsUpper<MT2> >::value >
1793 template<
typename MT1,
typename MT2 >
1795 :
public IsTrue< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
1811 template<
typename MT1,
typename MT2 >
1813 :
public IsTrue< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1814 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
1830 template<
typename MT1,
typename MT2,
typename VT >
1835 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1836 IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1837 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1838 ,
typename TSMatDVecMultExprTrait< MT1, typename TDMatDVecMultExprTrait<MT2,VT>::Type >::Type
1839 , INVALID_TYPE >::Type Type;
1848 template<
typename MT1,
typename MT2,
typename VT >
1853 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1854 IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1855 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1856 ,
typename TSMatDVecMultExprTrait< MT1, typename TDMatSVecMultExprTrait<MT2,VT>::Type >::Type
1857 , INVALID_TYPE >::Type Type;
1866 template<
typename VT,
typename MT1,
typename MT2 >
1871 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1872 IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1873 IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
1874 ,
typename TDVecTDMatMultExprTrait< typename TDVecTSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1875 , INVALID_TYPE >::Type Type;
1884 template<
typename VT,
typename MT1,
typename MT2 >
1889 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1890 IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1891 IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
1892 ,
typename TSVecTDMatMultExprTrait< typename TSVecTSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1893 , INVALID_TYPE >::Type Type;
1902 template<
typename MT1,
typename MT2,
bool AF >
1907 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
1908 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
1917 template<
typename MT1,
typename MT2 >
1922 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1931 template<
typename MT1,
typename MT2 >
1936 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
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
Header file for mathematical functions.
MT1::CompositeType CT1
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatTDMatMultExpr.h:130
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
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TSMatTDMatMultExpr.h:129
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.
Expression object for transpose sparse matrix-transpose dense matrix multiplications.The TSMatTDMatMultExpr class represents the compile time expression for multiplications between a column-major sparse matrix and a column-major dense matrix.
Definition: Forward.h:143
TSMatTDMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the TSMatTDMatMultExpr class.
Definition: TSMatTDMatMultExpr.h:237
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
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.
TSMatTDMatMultExpr< MT1, MT2 > This
Type of this TSMatTDMatMultExpr instance.
Definition: TSMatTDMatMultExpr.h:201
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TSMatTDMatMultExpr.h:128
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TSMatTDMatMultExpr.h:333
Header file for the IsColumnMajorMatrix type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
Header file for the TSVecTSMatMultExprTrait class template.
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.
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
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
SelectType< evaluateRight, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TSMatTDMatMultExpr.h:219
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TSMatTDMatMultExpr.h:203
Header file for the IsUniLower type trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TSMatTDMatMultExpr.h:345
MT2::ResultType RT2
Result type of the right-hand side dense matrix expression.
Definition: TSMatTDMatMultExpr.h:127
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.
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
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.
const size_t SMP_TSMATTDMATMULT_THRESHOLD
SMP column-major sparse matrix/column-major dense matrix multiplication threshold.This threshold specifies when a column-major sparse matrix/column-major dense matrix multiplication can be executed in parallel. In case the number of rows/columns of the target matrix is larger or equal to this threshold, the operation is executed in parallel. If the number of rows/columns is below this threshold the operation is executed single-threaded.
Definition: Thresholds.h:1087
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
#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
Header file for the TSVecTDMatMultExprTrait class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
Header file for the Or class template.
Header file for the TDMatSVecMultExprTrait class template.
Header file for the TDVecTSMatMultExprTrait 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.
Header file for the TSMatDVecMultExprTrait class template.
Header file for the IsLower type trait.
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: TSMatTDMatMultExpr.h:373
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:92
size_t rows() const
Returns the current number of rows of the matrix.
Definition: TSMatTDMatMultExpr.h:291
#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
Header file for the IsTriangular type trait.
Constraints on the storage order of matrix types.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSMatTDMatMultExpr.h:206
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
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatTDMatMultExpr.h:210
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.
SelectType< evaluateLeft, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: TSMatTDMatMultExpr.h:216
#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
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: TSMatTDMatMultExpr.h:372
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSMatTDMatMultExpr.h:207
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
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
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:150
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
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TSMatTDMatMultExpr.h:365
MT2::CompositeType CT2
Composite type of the right-hand side dense matrix expression.
Definition: TSMatTDMatMultExpr.h:131
Header file for the reset shim.
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: TSMatTDMatMultExpr.h:213
Header file for the isDefault shim.
MT1::ResultType RT1
Result type of the left-hand side sparse matrix expression.
Definition: TSMatTDMatMultExpr.h:126
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TSMatTDMatMultExpr.h:204
Header file for the RemoveReference type trait.
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TSMatTDMatMultExpr.h:202
#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
Header file for the IsDenseVector type trait.
RightOperand rightOperand() const
Returns the right-hand side transpose dense matrix operand.
Definition: TSMatTDMatMultExpr.h:321
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
LeftOperand leftOperand() const
Returns the left-hand side transpose sparse matrix operand.
Definition: TSMatTDMatMultExpr.h:311
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.
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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TSMatTDMatMultExpr.h:252
Header file for the TDMatDVecMultExprTrait class template.
#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
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TSMatTDMatMultExpr.h:355
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
Header file for the IsTrue value trait.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: TSMatTDMatMultExpr.h:301
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
Constraint on the data type.
Header file for the IsResizable type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: TSMatTDMatMultExpr.h:205
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
Header file for the TDVecTDMatMultExprTrait class template.
#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