35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_
128 template<
typename MT1
130 class TSMatDMatMultExpr :
public DenseMatrix< TSMatDMatMultExpr<MT1,MT2>, true >
131 ,
private MatMatMultExpr
132 ,
private Computation
161 template<
typename T1,
typename T2,
typename T3 >
162 struct CanExploitSymmetry {
163 enum :
bool { value = IsSymmetric<T2>::value };
174 template<
typename T1,
typename T2,
typename T3 >
175 struct IsEvaluationRequired {
176 enum :
bool { value = ( evaluateLeft || evaluateRight ) &&
177 !CanExploitSymmetry<T1,T2,T3>::value };
188 template<
typename T1,
typename T2,
typename T3 >
189 struct UseOptimizedKernel {
191 !IsDiagonal<T3>::value &&
192 !IsResizable< ElementType_<T1> >::value &&
193 !IsResizable<ET1>::value };
203 template<
typename T1,
typename T2,
typename T3 >
204 struct UseDefaultKernel {
205 enum :
bool { value = !UseOptimizedKernel<T1,T2,T3>::value };
235 enum :
bool { simdEnabled =
false };
238 enum :
bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
239 !evaluateRight && MT2::smpAssignable };
289 :(
lhs_.columns() ) ) );
293 const size_t n(
end - begin );
311 inline ReturnType
at(
size_t i,
size_t j )
const {
312 if( i >=
lhs_.rows() ) {
315 if( j >=
rhs_.columns() ) {
327 inline size_t rows() const noexcept {
338 return rhs_.columns();
368 template<
typename T >
369 inline bool canAlias(
const T* alias )
const noexcept {
370 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
380 template<
typename T >
381 inline bool isAliased(
const T* alias )
const noexcept {
382 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
392 return rhs_.isAligned();
402 return (
rows() *
columns() >= SMP_TSMATDMATMULT_THRESHOLD );
425 template<
typename MT
435 LT A(
serial( rhs.lhs_ ) );
436 RT B(
serial( rhs.rhs_ ) );
445 TSMatDMatMultExpr::selectAssignKernel( ~lhs, A, B );
461 template<
typename MT3
464 static inline void selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
466 const size_t size( C.rows() * C.columns() );
470 selectSmallAssignKernel( C, A, B );
472 selectLargeAssignKernel( C, A, B );
492 template<
typename MT3
495 static inline void selectDefaultAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
501 if( IsDiagonal<MT5>::value )
503 for(
size_t i=0UL; i<A.columns(); ++i )
505 const ConstIterator
end( A.end(i) );
506 ConstIterator element( A.begin(i) );
508 for( ; element!=
end; ++element ) {
509 C(element->index(),i) = element->value() * B(i,i);
515 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
517 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
519 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
521 for(
size_t i=0UL; i<A.columns(); ++i )
523 const ConstIterator
end( A.end(i) );
524 ConstIterator element( A.begin(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 for( ; element!=
end; ++element ) {
537 for(
size_t j=jbegin; j<jend; ++j ) {
539 C(element->index(),j) = element->value() * B(i,j);
541 C(element->index(),j) += element->value() * B(i,j);
565 template<
typename MT3
568 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
569 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
571 selectDefaultAssignKernel( C, A, B );
591 template<
typename MT3
594 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
595 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
599 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
603 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
605 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
607 for(
size_t i=0UL; i<A.columns(); ++i )
609 const size_t jbegin( ( IsUpper<MT5>::value )
610 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
612 const size_t jend( ( IsLower<MT5>::value )
613 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
619 const ConstIterator
end( A.end(i) );
620 ConstIterator element( A.begin(i) );
622 const size_t nonzeros( A.nonZeros(i) );
623 const size_t kpos( nonzeros &
size_t(-4) );
626 for(
size_t k=0UL; k<kpos; k+=4UL )
628 const size_t i1( element->index() );
629 const ET1 v1( element->value() );
631 const size_t i2( element->index() );
632 const ET1 v2( element->value() );
634 const size_t i3( element->index() );
635 const ET1 v3( element->value() );
637 const size_t i4( element->index() );
638 const ET1 v4( element->value() );
643 for(
size_t j=jbegin; j<jend; ++j ) {
644 C(i1,j) += v1 * B(i,j);
645 C(i2,j) += v2 * B(i,j);
646 C(i3,j) += v3 * B(i,j);
647 C(i4,j) += v4 * B(i,j);
651 for( ; element!=
end; ++element ) {
652 for(
size_t j=jbegin; j<jend; ++j ) {
653 C(element->index(),j) += element->value() * B(i,j);
676 template<
typename MT3
679 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
680 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
682 selectDefaultAssignKernel( C, A, B );
702 template<
typename MT3
705 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
706 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
710 const OppositeType_<MT4> tmp(
serial( A ) );
711 assign( C, tmp * B );
729 template<
typename MT
731 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
736 typedef IfTrue_< SO, ResultType, OppositeType > TmpType;
748 const TmpType tmp(
serial( rhs ) );
769 template<
typename MT
771 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
781 assign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
799 template<
typename MT
801 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
809 LT A(
serial( rhs.lhs_ ) );
810 RT B(
serial( rhs.rhs_ ) );
819 TSMatDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
835 template<
typename MT3
838 static inline void selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
840 const size_t size( C.rows() * C.columns() );
842 if( ( IsRowMajorMatrix<MT3>::value &&
size < TSMATDMATMULT_THRESHOLD ) ||
843 ( IsColumnMajorMatrix<MT3>::value &&
size < 625UL ) )
844 selectSmallAddAssignKernel( C, A, B );
846 selectLargeAddAssignKernel( C, A, B );
866 template<
typename MT3
869 static inline void selectDefaultAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
873 if( IsDiagonal<MT5>::value )
875 for(
size_t i=0UL; i<A.columns(); ++i )
877 const ConstIterator
end( A.end(i) );
878 ConstIterator element( A.begin(i) );
880 for( ; element!=
end; ++element ) {
881 C(element->index(),i) += element->value() * B(i,i);
887 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
889 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
891 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
893 for(
size_t i=0UL; i<A.columns(); ++i )
895 const ConstIterator
end( A.end(i) );
896 ConstIterator element( A.begin(i) );
898 const size_t jbegin( ( IsUpper<MT5>::value )
899 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
901 const size_t jend( ( IsLower<MT5>::value )
902 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
908 for( ; element!=
end; ++element ) {
909 for(
size_t j=jbegin; j<jend; ++j ) {
910 C(element->index(),j) += element->value() * B(i,j);
934 template<
typename MT3
937 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
938 selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
940 selectDefaultAddAssignKernel( C, A, B );
960 template<
typename MT3
963 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
964 selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
968 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
970 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
972 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
974 for(
size_t i=0UL; i<A.columns(); ++i )
976 const size_t jbegin( ( IsUpper<MT5>::value )
977 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
979 const size_t jend( ( IsLower<MT5>::value )
980 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
986 const ConstIterator
end( A.end(i) );
987 ConstIterator element( A.begin(i) );
989 const size_t nonzeros( A.nonZeros(i) );
990 const size_t kpos( nonzeros &
size_t(-4) );
993 for(
size_t k=0UL; k<kpos; k+=4UL )
995 const size_t i1( element->index() );
996 const ET1 v1( element->value() );
998 const size_t i2( element->index() );
999 const ET1 v2( element->value() );
1001 const size_t i3( element->index() );
1002 const ET1 v3( element->value() );
1004 const size_t i4( element->index() );
1005 const ET1 v4( element->value() );
1010 for(
size_t j=jbegin; j<jend; ++j ) {
1011 C(i1,j) += v1 * B(i,j);
1012 C(i2,j) += v2 * B(i,j);
1013 C(i3,j) += v3 * B(i,j);
1014 C(i4,j) += v4 * B(i,j);
1018 for( ; element!=
end; ++element ) {
1019 for(
size_t j=jbegin; j<jend; ++j ) {
1020 C(element->index(),j) += element->value() * B(i,j);
1043 template<
typename MT3
1046 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
1047 selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1049 selectDefaultAddAssignKernel( C, A, B );
1069 template<
typename MT3
1072 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
1073 selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1077 const OppositeType_<MT4> tmp(
serial( A ) );
1078 addAssign( C, tmp * B );
1098 template<
typename MT
1100 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1110 addAssign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
1132 template<
typename MT
1134 friend inline DisableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1142 LT A(
serial( rhs.lhs_ ) );
1143 RT B(
serial( rhs.rhs_ ) );
1152 TSMatDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1168 template<
typename MT3
1171 static inline void selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1173 const size_t size( C.rows() * C.columns() );
1175 if( ( IsRowMajorMatrix<MT3>::value &&
size < TSMATDMATMULT_THRESHOLD ) ||
1176 ( IsColumnMajorMatrix<MT3>::value &&
size < 625UL ) )
1177 selectSmallSubAssignKernel( C, A, B );
1179 selectLargeSubAssignKernel( C, A, B );
1199 template<
typename MT3
1202 static inline void selectDefaultSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1206 if( IsDiagonal<MT5>::value )
1208 for(
size_t i=0UL; i<A.columns(); ++i )
1210 const ConstIterator
end( A.end(i) );
1211 ConstIterator element( A.begin(i) );
1213 for( ; element!=
end; ++element ) {
1214 C(element->index(),i) -= element->value() * B(i,i);
1220 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
1222 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1224 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1226 for(
size_t i=0UL; i<A.columns(); ++i )
1228 const ConstIterator
end( A.end(i) );
1229 ConstIterator element( A.begin(i) );
1231 const size_t jbegin( ( IsUpper<MT5>::value )
1232 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
1234 const size_t jend( ( IsLower<MT5>::value )
1235 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
1238 if( jbegin >= jend )
1241 for( ; element!=
end; ++element ) {
1242 for(
size_t j=jbegin; j<jend; ++j ) {
1243 C(element->index(),j) -= element->value() * B(i,j);
1267 template<
typename MT3
1270 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
1271 selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1273 selectDefaultSubAssignKernel( C, A, B );
1293 template<
typename MT3
1296 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
1297 selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1301 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
1303 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1305 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1307 for(
size_t i=0UL; i<A.columns(); ++i )
1309 const size_t jbegin( ( IsUpper<MT5>::value )
1310 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
1312 const size_t jend( ( IsLower<MT5>::value )
1313 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
1316 if( jbegin >= jend )
1319 const ConstIterator
end( A.end(i) );
1320 ConstIterator element( A.begin(i) );
1322 const size_t nonzeros( A.nonZeros(i) );
1323 const size_t kpos( nonzeros &
size_t(-4) );
1326 for(
size_t k=0UL; k<kpos; k+=4UL )
1328 const size_t i1( element->index() );
1329 const ET1 v1( element->value() );
1331 const size_t i2( element->index() );
1332 const ET1 v2( element->value() );
1334 const size_t i3( element->index() );
1335 const ET1 v3( element->value() );
1337 const size_t i4( element->index() );
1338 const ET1 v4( element->value() );
1343 for(
size_t j=jbegin; j<jend; ++j ) {
1344 C(i1,j) -= v1 * B(i,j);
1345 C(i2,j) -= v2 * B(i,j);
1346 C(i3,j) -= v3 * B(i,j);
1347 C(i4,j) -= v4 * B(i,j);
1351 for( ; element!=
end; ++element ) {
1352 for(
size_t j=jbegin; j<jend; ++j ) {
1353 C(element->index(),j) -= element->value() * B(i,j);
1376 template<
typename MT3
1379 static inline EnableIf_< UseDefaultKernel<MT3,MT4,MT5> >
1380 selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1382 selectDefaultSubAssignKernel( C, A, B );
1402 template<
typename MT3
1405 static inline EnableIf_< UseOptimizedKernel<MT3,MT4,MT5> >
1406 selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1410 const OppositeType_<MT4> tmp(
serial( A ) );
1411 subAssign( C, tmp * B );
1431 template<
typename MT
1433 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1443 subAssign( ~lhs,
trans( rhs.lhs_ ) * rhs.rhs_ );
1476 template<
typename MT
1478 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1517 template<
typename MT
1519 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1524 typedef IfTrue_< SO, ResultType, OppositeType > TmpType;
1536 const TmpType tmp( rhs );
1557 template<
typename MT
1559 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1588 template<
typename MT
1590 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1628 template<
typename MT
1630 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1663 template<
typename MT
1665 friend inline EnableIf_< IsEvaluationRequired<MT,MT1,MT2> >
1703 template<
typename MT
1705 friend inline EnableIf_< CanExploitSymmetry<MT,MT1,MT2> >
1782 template<
typename T1
1784 inline const TSMatDMatMultExpr<T1,T2>
1808 template<
typename MT1,
typename MT2 >
1825 template<
typename MT1,
typename MT2 >
1842 template<
typename MT1,
typename MT2 >
1860 template<
typename MT1,
typename MT2 >
1862 :
public BoolConstant< And< IsLower<MT1>, IsLower<MT2> >::value >
1878 template<
typename MT1,
typename MT2 >
1880 :
public BoolConstant< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
1896 template<
typename MT1,
typename MT2 >
1898 :
public BoolConstant< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1899 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
1915 template<
typename MT1,
typename MT2 >
1917 :
public BoolConstant< And< IsUpper<MT1>, IsUpper<MT2> >::value >
1933 template<
typename MT1,
typename MT2 >
1935 :
public BoolConstant< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
1951 template<
typename MT1,
typename MT2 >
1953 :
public BoolConstant< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1954 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
1970 template<
typename MT1,
typename MT2,
typename VT >
1975 using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
1976 , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
1977 , IsDenseVector<VT>, IsColumnVector<VT> >
1978 , TSMatDVecMultExprTrait_< MT1, DMatDVecMultExprTrait_<MT2,VT> >
1988 template<
typename MT1,
typename MT2,
typename VT >
1993 using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
1994 , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
1995 , IsSparseVector<VT>, IsColumnVector<VT> >
1996 , TSMatDVecMultExprTrait_< MT1, DMatSVecMultExprTrait_<MT2,VT> >
2006 template<
typename VT,
typename MT1,
typename MT2 >
2011 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
2012 , IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2013 , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2> >
2014 , TDVecDMatMultExprTrait_< TDVecTSMatMultExprTrait_<VT,MT1>, MT2 >
2024 template<
typename VT,
typename MT1,
typename MT2 >
2029 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
2030 , IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2031 , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2> >
2032 , TDVecDMatMultExprTrait_< TDVecTSMatMultExprTrait_<VT,MT1>, MT2 >
2042 template<
typename MT1,
typename MT2,
bool AF >
2047 using Type = MultExprTrait_< SubmatrixExprTrait_<const MT1,AF>
2048 , SubmatrixExprTrait_<const MT2,AF> >;
2057 template<
typename MT1,
typename MT2 >
2062 using Type = MultExprTrait_< RowExprTrait_<const MT1>, MT2 >;
2071 template<
typename MT1,
typename MT2 >
2076 using Type = MultExprTrait_< MT1, ColumnExprTrait_<const MT2> >;
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:408
#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
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
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TSMatDMatMultExpr.h:214
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: TSMatDMatMultExpr.h:337
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.
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.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
#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.
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:230
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:215
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
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:533
Header file for the TSVecTSMatMultExprTrait class template.
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
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TSMatDMatMultExpr.h:381
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
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.
If_< IsExpression< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:224
System settings for performance optimizations.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TSMatDMatMultExpr.h:369
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
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose sparse matrix operand.
Definition: TSMatDMatMultExpr.h:347
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
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
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
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
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:213
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
If_< IsExpression< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:221
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
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
#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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TSMatDMatMultExpr.h:263
Header file for the TSVecTDMatMultExprTrait class template.
ResultType_< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:137
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.
Header file for the TDMatSVecMultExprTrait class template.
Header file for the TDVecTSMatMultExprTrait class template.
CompositeType_< MT1 > CT1
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:140
#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.
Header file for the TSMatDVecMultExprTrait class template.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
ResultType_< MT1 > RT1
Result type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:136
Header file for the DMatDVecMultExprTrait class template.
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
#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.
TSMatDMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the TSMatDMatMultExpr class.
Definition: TSMatDMatMultExpr.h:248
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
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TSMatDMatMultExpr.h:216
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
CompositeType_< MT2 > CT2
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:141
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.
#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
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TSMatDMatMultExpr.h:391
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: TSMatDMatMultExpr.h:227
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
TSMatDMatMultExpr< MT1, MT2 > This
Type of this TSMatDMatMultExpr instance.
Definition: TSMatDMatMultExpr.h:212
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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:217
Header file for run time assertion macros.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:83
Utility type for generic codes.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: TSMatDMatMultExpr.h:311
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSMatDMatMultExpr.h:218
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
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:409
Header file for the reset shim.
Header file for the isDefault shim.
Constraints on the storage order of matrix types.
RightOperand rightOperand() const noexcept
Returns the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:357
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
ElementType_< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:138
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
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TSMatDMatMultExpr.h:401
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.
Expression object for transpose sparse matrix-dense matrix multiplications.The TSMatDMatMultExpr clas...
Definition: Forward.h:140
Header file for the TDVecDMatMultExprTrait class template.
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
Header file for the IntegralConstant class template.
ElementType_< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:139
Header file for the TSVecDMatMultExprTrait class template.
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.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: TSMatDMatMultExpr.h:327
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
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:61
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.