35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_ 117 template<
typename MT1
123 class TSMatDMatMultExpr
124 :
public MatMatMultExpr< DenseMatrix< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF>, true > >
125 ,
private Computation
150 SYM = ( SF && !( HF || LF || UF ) ),
151 HERM = ( HF && !( LF || UF ) ),
152 LOW = ( LF || ( ( SF || HF ) && UF ) ),
153 UPP = ( UF || ( ( SF || HF ) && LF ) )
164 template<
typename T1,
typename T2,
typename T3 >
165 struct CanExploitSymmetry {
177 template<
typename T1,
typename T2,
typename T3 >
178 struct IsEvaluationRequired {
179 enum :
bool { value = ( evaluateLeft || evaluateRight ) &&
180 !CanExploitSymmetry<T1,T2,T3>::value };
191 template<
typename T1,
typename T2,
typename T3 >
192 struct UseOptimizedKernel {
193 enum :
bool { value = useOptimizedKernels &&
206 template<
typename T1,
typename T2,
typename T3 >
207 struct UseDefaultKernel {
208 enum :
bool { value = !UseOptimizedKernel<T1,T2,T3>::value };
259 enum :
bool { simdEnabled =
false };
262 enum :
bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
263 !evaluateRight && MT2::smpAssignable };
313 :(
lhs_.columns() ) ) );
317 const size_t n(
end - begin );
337 if( i >=
lhs_.rows() ) {
340 if( j >=
rhs_.columns() ) {
352 inline size_t rows() const noexcept {
363 return rhs_.columns();
393 template<
typename T >
394 inline bool canAlias(
const T* alias )
const noexcept {
395 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
405 template<
typename T >
406 inline bool isAliased(
const T* alias )
const noexcept {
407 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
417 return rhs_.isAligned();
450 template<
typename MT
470 TSMatDMatMultExpr::selectAssignKernel( ~lhs, A, B );
486 template<
typename MT3
489 static inline void selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
491 const size_t size( C.rows() * C.columns() );
495 selectSmallAssignKernel( C, A, B );
497 selectLargeAssignKernel( C, A, B );
517 template<
typename MT3
520 static inline void selectDefaultAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
528 for(
size_t i=0UL; i<A.columns(); ++i )
533 for( ; element!=
end; ++element ) {
534 C(element->index(),i) = element->value() * B(i,i);
542 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
544 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
546 for(
size_t i=0UL; i<A.columns(); ++i )
551 for( ; element!=
end; ++element )
553 const size_t i1( element->index() );
556 ?( ( SYM || HERM || UPP )
559 :( SYM || HERM || UPP ?
max(i1,jj) : jj ) );
564 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
569 for(
size_t j=jbegin; j<jend; ++j ) {
571 C(i1,j) = element->value() * B(i,j);
573 C(i1,j) += element->value() * B(i,j);
581 for(
size_t j=0UL; j<B.columns(); ++j ) {
582 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
583 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
605 template<
typename MT3
609 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
611 selectDefaultAssignKernel( C, A, B );
631 template<
typename MT3
635 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
643 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
645 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
647 for(
size_t i=0UL; i<A.columns(); ++i )
652 const size_t nonzeros( A.nonZeros(i) );
653 const size_t kpos( nonzeros &
size_t(-4) );
656 for(
size_t k=0UL; k<kpos; k+=4UL )
658 const size_t i1( element->index() );
659 const ET1 v1( element->value() );
661 const size_t i2( element->index() );
662 const ET1 v2( element->value() );
664 const size_t i3( element->index() );
665 const ET1 v3( element->value() );
667 const size_t i4( element->index() );
668 const ET1 v4( element->value() );
674 ?( ( SYM || HERM || UPP )
677 :( SYM || HERM || UPP ?
max(i1,jj) : jj ) );
682 :( LOW ?
min(i4+1UL,jpos) : jpos ) );
687 for(
size_t j=jbegin; j<jend; ++j ) {
688 C(i1,j) += v1 * B(i,j);
689 C(i2,j) += v2 * B(i,j);
690 C(i3,j) += v3 * B(i,j);
691 C(i4,j) += v4 * B(i,j);
695 for( ; element!=
end; ++element )
697 const size_t i1( element->index() );
700 ?( ( SYM || HERM || UPP )
703 :( SYM || HERM || UPP ?
max(i1,jj) : jj ) );
708 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
713 for(
size_t j=jbegin; j<jend; ++j ) {
714 C(i1,j) += element->value() * B(i,j);
721 for(
size_t j=0UL; j<B.columns(); ++j ) {
722 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
723 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
745 template<
typename MT3
749 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
751 selectDefaultAssignKernel( C, A, B );
771 template<
typename MT3
775 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
779 const ForwardFunctor fwd;
782 assign( C, fwd( tmp * B ) );
800 template<
typename MT
819 const ForwardFunctor fwd;
821 const TmpType tmp(
serial( rhs ) );
822 assign( ~lhs, fwd( tmp ) );
842 template<
typename MT
854 const ForwardFunctor fwd;
856 assign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
874 template<
typename MT
894 TSMatDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
910 template<
typename MT3
913 static inline void selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
915 const size_t size( C.rows() * C.columns() );
919 selectSmallAddAssignKernel( C, A, B );
921 selectLargeAddAssignKernel( C, A, B );
941 template<
typename MT3
944 static inline void selectDefaultAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
950 for(
size_t i=0UL; i<A.columns(); ++i )
955 for( ; element!=
end; ++element ) {
956 C(element->index(),i) += element->value() * B(i,i);
964 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
966 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
968 for(
size_t i=0UL; i<A.columns(); ++i )
973 for( ; element!=
end; ++element )
975 const size_t i1( element->index() );
981 :( UPP ?
max(i1,jj) : jj ) );
986 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
991 for(
size_t j=jbegin; j<jend; ++j ) {
992 C(i1,j) += element->value() * B(i,j);
1016 template<
typename MT3
1020 selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1022 selectDefaultAddAssignKernel( C, A, B );
1042 template<
typename MT3
1046 selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1052 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1054 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1056 for(
size_t i=0UL; i<A.columns(); ++i )
1061 const size_t nonzeros( A.nonZeros(i) );
1062 const size_t kpos( nonzeros &
size_t(-4) );
1065 for(
size_t k=0UL; k<kpos; k+=4UL )
1067 const size_t i1( element->index() );
1068 const ET1 v1( element->value() );
1070 const size_t i2( element->index() );
1071 const ET1 v2( element->value() );
1073 const size_t i3( element->index() );
1074 const ET1 v3( element->value() );
1076 const size_t i4( element->index() );
1077 const ET1 v4( element->value() );
1086 :( UPP ?
max(i1,jj) : jj ) );
1091 :( LOW ?
min(i4+1UL,jpos) : jpos ) );
1093 if( jbegin >= jend )
1096 for(
size_t j=jbegin; j<jend; ++j ) {
1097 C(i1,j) += v1 * B(i,j);
1098 C(i2,j) += v2 * B(i,j);
1099 C(i3,j) += v3 * B(i,j);
1100 C(i4,j) += v4 * B(i,j);
1104 for( ; element!=
end; ++element )
1106 const size_t i1( element->index() );
1112 :( UPP ?
max(i1,jj) : jj ) );
1117 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
1119 if( jbegin >= jend )
1122 for(
size_t j=jbegin; j<jend; ++j ) {
1123 C(i1,j) += element->value() * B(i,j);
1146 template<
typename MT3
1150 selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1152 selectDefaultAddAssignKernel( C, A, B );
1172 template<
typename MT3
1176 selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1180 const ForwardFunctor fwd;
1183 addAssign( C, fwd( tmp * B ) );
1203 template<
typename MT
1215 const ForwardFunctor fwd;
1217 addAssign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1239 template<
typename MT
1259 TSMatDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1275 template<
typename MT3
1278 static inline void selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1280 const size_t size( C.rows() * C.columns() );
1284 selectSmallSubAssignKernel( C, A, B );
1286 selectLargeSubAssignKernel( C, A, B );
1306 template<
typename MT3
1309 static inline void selectDefaultSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1315 for(
size_t i=0UL; i<A.columns(); ++i )
1320 for( ; element!=
end; ++element ) {
1321 C(element->index(),i) -= element->value() * B(i,i);
1329 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1331 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1333 for(
size_t i=0UL; i<A.columns(); ++i )
1338 for( ; element!=
end; ++element )
1340 const size_t i1( element->index() );
1346 :( UPP ?
max(i1,jj) : jj ) );
1351 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
1353 if( jbegin >= jend )
1356 for(
size_t j=jbegin; j<jend; ++j ) {
1357 C(i1,j) -= element->value() * B(i,j);
1381 template<
typename MT3
1385 selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1387 selectDefaultSubAssignKernel( C, A, B );
1407 template<
typename MT3
1411 selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1417 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1419 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1421 for(
size_t i=0UL; i<A.columns(); ++i )
1426 const size_t nonzeros( A.nonZeros(i) );
1427 const size_t kpos( nonzeros &
size_t(-4) );
1430 for(
size_t k=0UL; k<kpos; k+=4UL )
1432 const size_t i1( element->index() );
1433 const ET1 v1( element->value() );
1435 const size_t i2( element->index() );
1436 const ET1 v2( element->value() );
1438 const size_t i3( element->index() );
1439 const ET1 v3( element->value() );
1441 const size_t i4( element->index() );
1442 const ET1 v4( element->value() );
1451 :( UPP ?
max(i1,jj) : jj ) );
1456 :( LOW ?
min(i4+1UL,jpos) : jpos ) );
1458 if( jbegin >= jend )
1461 for(
size_t j=jbegin; j<jend; ++j ) {
1462 C(i1,j) -= v1 * B(i,j);
1463 C(i2,j) -= v2 * B(i,j);
1464 C(i3,j) -= v3 * B(i,j);
1465 C(i4,j) -= v4 * B(i,j);
1469 for( ; element!=
end; ++element )
1471 const size_t i1( element->index() );
1477 :( UPP ?
max(i1,jj) : jj ) );
1482 :( LOW ?
min(i1+1UL,jpos) : jpos ) );
1484 if( jbegin >= jend )
1487 for(
size_t j=jbegin; j<jend; ++j ) {
1488 C(i1,j) -= element->value() * B(i,j);
1511 template<
typename MT3
1515 selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1517 selectDefaultSubAssignKernel( C, A, B );
1537 template<
typename MT3
1541 selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1545 const ForwardFunctor fwd;
1548 subAssign( C, fwd( tmp * B ) );
1568 template<
typename MT
1580 const ForwardFunctor fwd;
1582 subAssign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1604 template<
typename MT
1618 schurAssign( ~lhs, tmp );
1651 template<
typename MT
1692 template<
typename MT
1711 const ForwardFunctor fwd;
1713 const TmpType tmp( rhs );
1734 template<
typename MT
1744 const ForwardFunctor fwd;
1767 template<
typename MT
1807 template<
typename MT
1817 const ForwardFunctor fwd;
1844 template<
typename MT
1884 template<
typename MT
1894 const ForwardFunctor fwd;
1918 template<
typename MT
2001 template<
typename MT1
2003 inline decltype(
auto)
2052 template<
typename MT1
2067 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2099 template<
typename MT1
2114 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2146 template<
typename MT1
2161 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2193 template<
typename MT1
2208 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2240 template<
typename MT1
2255 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2271 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2272 struct Size< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 0UL >
2273 :
public Size<MT1,0UL>
2276 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2277 struct Size< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 1UL >
2278 :
public Size<MT2,1UL>
2294 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2295 struct IsAligned< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2312 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2313 struct IsSymmetric< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2314 :
public Or< Bool<SF>
2316 , IsBuiltin< ElementType_< TSMatDMatMultExpr<MT1,MT2,false,true,false,false> > > >
2317 , And< Bool<LF>, Bool<UF> > >
2333 template<
typename MT1,
typename MT2,
bool SF,
bool LF,
bool UF >
2334 struct IsHermitian< TSMatDMatMultExpr<MT1,MT2,SF,true,LF,UF> >
2351 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2352 struct IsLower< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2353 :
public Or< Bool<LF>
2354 , And< IsLower<MT1>, IsLower<MT2> >
2355 , And< Or< Bool<SF>, Bool<HF> >
2356 , IsUpper<MT1>, IsUpper<MT2> > >
2372 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2373 struct IsUniLower< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2374 :
public Or< And< IsUniLower<MT1>, IsUniLower<MT2> >
2375 , And< Or< Bool<SF>, Bool<HF> >
2376 , IsUniUpper<MT1>, IsUniUpper<MT2> > >
2392 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2394 :
public Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2395 , And< IsStrictlyLower<MT2>, IsLower<MT1> >
2396 , And< Or< Bool<SF>, Bool<HF> >
2397 , Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2398 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > > > >
2414 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2415 struct IsUpper< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2416 :
public Or< Bool<UF>
2417 , And< IsUpper<MT1>, IsUpper<MT2> >
2418 , And< Or< Bool<SF>, Bool<HF> >
2419 , IsLower<MT1>, IsLower<MT2> > >
2435 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2436 struct IsUniUpper< TSMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2437 :
public Or< And< IsUniUpper<MT1>, IsUniUpper<MT2> >
2438 , And< Or< Bool<SF>, Bool<HF> >
2439 , IsUniLower<MT1>, IsUniLower<MT2> > >
2455 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2457 :
public Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2458 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> >
2459 , And< Or< Bool<SF>, Bool<HF> >
2460 , Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2461 , And< IsStrictlyLower<MT2>, IsLower<MT1> > > > >
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:329
#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.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
Headerfile for the generic min algorithm.
Header file for the blaze::checked and blaze::unchecked instances.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:71
ResultType_< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:130
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:996
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TSMatDMatMultExpr.h:416
Header file for the IsUniUpper type trait.
EnableIf_< IsDenseMatrix< MT1 > > smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:196
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:86
Header file for basic type definitions.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TSMatDMatMultExpr.h:240
CompositeType_< MT1 > CT1
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:133
Flag for symmetric matrices.
Definition: TSMatDMatMultExpr.h:150
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:164
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TSMatDMatMultExpr.h:287
Header file for the serial shim.
ElementType_< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:132
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: TSMatDMatMultExpr.h:362
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:265
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#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 DeclUpp functor.
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:433
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:364
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:588
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
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:1903
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:87
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1026
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:291
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose sparse matrix operand.
Definition: TSMatDMatMultExpr.h:372
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:87
Constraints on the storage order of matrix types.
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:254
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1950
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:133
CompositeType_< MT2 > CT2
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:134
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: TSMatDMatMultExpr.h:352
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSMatDMatMultExpr.h:242
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
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
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: TSMatDMatMultExpr.h:251
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:434
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
If_< IsExpression< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:248
Constraint on the data type.
Constraint on the data type.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:71
Flag for Hermitian matrices.
Definition: TSMatDMatMultExpr.h:151
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Headerfile for the generic max algorithm.
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:58
Header file for the DeclLow functor.
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:110
#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
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:239
Generic wrapper for the decllow() function.
Definition: DeclLow.h:58
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:102
Header file for the Or class template.
If_< IsExpression< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:245
#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.
Flag for lower matrices.
Definition: TSMatDMatMultExpr.h:152
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:237
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1026
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:89
ElementType_< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:131
Generic wrapper for the null function.
Definition: Noop.h:59
Header file for the IsTriangular type trait.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: TSMatDMatMultExpr.h:336
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TSMatDMatMultExpr.h:426
Constraints on the storage order of matrix types.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:430
Header file for the DeclDiag functor.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
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:107
RightOperand rightOperand() const noexcept
Returns the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:382
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for the conjugate shim.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
#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
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for run time assertion macros.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:110
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:154
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
TSMatDMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the TSMatDMatMultExpr class.
Definition: TSMatDMatMultExpr.h:272
Header file for the reset shim.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
decltype(auto) declsym(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as symmetric.
Definition: DMatDeclSymExpr.h:1028
Header file for the isDefault shim.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
Constraint on the data type.
Constraints on the storage order of matrix types.
Generic wrapper for the declherm() function.
Definition: DeclHerm.h:58
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
Header file for the Noop functor.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TSMatDMatMultExpr.h:238
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:263
#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
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:58
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:241
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:789
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TSMatDMatMultExpr.h:406
decltype(auto) declherm(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:1028
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
Expression object for transpose sparse matrix-dense matrix multiplications.The TSMatDMatMultExpr clas...
Definition: Forward.h:160
Compile time logical 'or' evaluation.The Or alias declaration performs at compile time a logical 'or'...
Definition: Or.h:76
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Generic wrapper for the decldiag() function.
Definition: DeclDiag.h:58
Flag for upper matrices.
Definition: TSMatDMatMultExpr.h:153
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TSMatDMatMultExpr.h:394
Header file for the DeclHerm functor.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
Header file for the IsUpper type trait.
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1321
Constraint on the data type.
Generic wrapper for the declsym() function.
Definition: DeclSym.h:58
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:908
Header file for the IsResizable type trait.
Header file for the Size 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 Bool class template.
Header file for the DeclSym functor.
#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 function trace functionality.
ResultType_< MT1 > RT1
Result type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:129