35#ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_
120template<
typename MT1
127 :
public MatMatMultExpr< DenseMatrix< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, false > >
151 static constexpr bool SYM = ( SF && !( HF || LF || UF ) );
152 static constexpr bool HERM = ( HF && !( LF || UF ) );
153 static constexpr bool LOW = ( LF || ( ( SF || HF ) && UF ) );
154 static constexpr bool UPP = ( UF || ( ( SF || HF ) && LF ) );
164 template<
typename T1,
typename T2,
typename T3 >
175 template<
typename T1,
typename T2,
typename T3 >
176 static constexpr bool IsEvaluationRequired_v =
186 template<
typename T1,
typename T2,
typename T3 >
187 static constexpr bool UseOptimizedKernel_v =
188 ( useOptimizedKernels &&
310 :(
lhs_.columns() ) ) );
334 if( i >=
lhs_.rows() ) {
337 if( j >=
rhs_.columns() ) {
349 inline size_t rows() const noexcept {
360 return rhs_.columns();
390 template<
typename T >
391 inline bool canAlias(
const T* alias )
const noexcept {
392 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
402 template<
typename T >
403 inline bool isAliased(
const T* alias )
const noexcept {
404 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
414 return lhs_.isAligned();
447 template<
typename MT
464 DMatTSMatMultExpr::selectAssignKernel( *lhs, A, B );
483 template<
typename MT3
486 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
489 const size_t M( A.rows() );
490 const size_t N( B.columns() );
501 for( ; (i+4UL) <= M; i+=4UL ) {
502 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
511 if( element ==
end ) {
519 C(i ,j) = A(i ,element->index()) * element->value();
520 C(i+1UL,j) = A(i+1UL,element->index()) * element->value();
521 C(i+2UL,j) = A(i+2UL,element->index()) * element->value();
522 C(i+3UL,j) = A(i+3UL,element->index()) * element->value();
524 for( ; element!=
end; ++element ) {
525 C(i ,j) += A(i ,element->index()) * element->value();
526 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
527 C(i+2UL,j) += A(i+2UL,element->index()) * element->value();
528 C(i+3UL,j) += A(i+3UL,element->index()) * element->value();
533 for( ; (i+2UL) <= M; i+=2UL ) {
534 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
543 if( element ==
end ) {
549 C(i ,j) = A(i ,element->index()) * element->value();
550 C(i+1UL,j) = A(i+1UL,element->index()) * element->value();
552 for( ; element!=
end; ++element ) {
553 C(i ,j) += A(i ,element->index()) * element->value();
554 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
560 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
569 if( element ==
end ) {
574 C(i,j) = A(i,element->index()) * element->value();
576 for( ; element!=
end; ++element )
577 C(i,j) += A(i,element->index()) * element->value();
583 for(
size_t i=1UL; i<M; ++i ) {
584 for(
size_t j=0UL; j<i; ++j ) {
585 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
590 for(
size_t j=1UL; j<N; ++j ) {
591 for(
size_t i=0UL; i<j; ++i ) {
597 for(
size_t i=1UL; i<M; ++i ) {
598 for(
size_t j=0UL; j<i; ++j ) {
621 template<
typename MT3
624 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
627 const size_t M( A.rows() );
628 const size_t N( B.columns() );
637 for( ; (i+4UL) <= M; i+=4UL ) {
638 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
647 const size_t nonzeros(
end - element );
651 for(
size_t k=0UL; k<kpos; k+=4UL )
653 const size_t j1( element->index() );
654 const ET2 v1( element->value() );
656 const size_t j2( element->index() );
657 const ET2 v2( element->value() );
659 const size_t j3( element->index() );
660 const ET2 v3( element->value() );
662 const size_t j4( element->index() );
663 const ET2 v4( element->value() );
668 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
669 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
670 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
671 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
674 for( ; element!=
end; ++element )
676 const size_t j1( element->index() );
677 const ET2 v1( element->value() );
679 C(i ,j) += A(i ,j1) * v1;
680 C(i+1UL,j) += A(i+1UL,j1) * v1;
681 C(i+2UL,j) += A(i+2UL,j1) * v1;
682 C(i+3UL,j) += A(i+3UL,j1) * v1;
687 for( ; (i+2UL) <= M; i+=2UL ) {
688 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
697 const size_t nonzeros(
end - element );
701 for(
size_t k=0UL; k<kpos; k+=4UL )
703 const size_t j1( element->index() );
704 const ET2 v1( element->value() );
706 const size_t j2( element->index() );
707 const ET2 v2( element->value() );
709 const size_t j3( element->index() );
710 const ET2 v3( element->value() );
712 const size_t j4( element->index() );
713 const ET2 v4( element->value() );
718 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
719 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
722 for( ; element!=
end; ++element )
724 const size_t j1( element->index() );
725 const ET2 v1( element->value() );
727 C(i ,j) += A(i ,j1) * v1;
728 C(i+1UL,j) += A(i+1UL,j1) * v1;
734 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
743 const size_t nonzeros(
end - element );
747 for(
size_t k=0UL; k<kpos; k+=4UL )
749 const size_t j1( element->index() );
750 const ET2 v1( element->value() );
752 const size_t j2( element->index() );
753 const ET2 v2( element->value() );
755 const size_t j3( element->index() );
756 const ET2 v3( element->value() );
758 const size_t j4( element->index() );
759 const ET2 v4( element->value() );
764 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
767 for( ; element!=
end; ++element )
769 const size_t j1( element->index() );
770 const ET2 v1( element->value() );
772 C(i,j) += A(i,j1) * v1;
779 for(
size_t i=1UL; i<M; ++i ) {
780 for(
size_t j=0UL; j<i; ++j ) {
781 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
802 template<
typename MT
804 friend inline auto assign( SparseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
821 const ForwardFunctor fwd;
823 const TmpType tmp(
serial( rhs ) );
824 assign( *lhs, fwd( tmp ) );
844 template<
typename MT
854 const ForwardFunctor fwd;
856 assign( *lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
874 template<
typename MT
876 friend inline auto addAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
891 DMatTSMatMultExpr::selectAddAssignKernel( *lhs, A, B );
910 template<
typename MT3
913 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
916 const size_t M( A.rows() );
917 const size_t N( B.columns() );
924 for( ; (i+4UL) <= M; i+=4UL ) {
925 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
934 for( ; element!=
end; ++element ) {
935 C(i ,j) += A(i ,element->index()) * element->value();
936 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
937 C(i+2UL,j) += A(i+2UL,element->index()) * element->value();
938 C(i+3UL,j) += A(i+3UL,element->index()) * element->value();
943 for( ; (i+2UL) <= M; i+=2UL ) {
944 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
953 for( ; element!=
end; ++element ) {
954 C(i ,j) += A(i ,element->index()) * element->value();
955 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
961 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
970 for( ; element!=
end; ++element )
971 C(i,j) += A(i,element->index()) * element->value();
993 template<
typename MT3
996 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
999 const size_t M( A.rows() );
1000 const size_t N( B.columns() );
1007 for( ; (i+4UL) <= M; i+=4UL ) {
1008 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1017 const size_t nonzeros(
end - element );
1021 for(
size_t k=0UL; k<kpos; k+=4UL )
1023 const size_t j1( element->index() );
1024 const ET2 v1( element->value() );
1026 const size_t j2( element->index() );
1027 const ET2 v2( element->value() );
1029 const size_t j3( element->index() );
1030 const ET2 v3( element->value() );
1032 const size_t j4( element->index() );
1033 const ET2 v4( element->value() );
1038 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1039 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1040 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1041 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1044 for( ; element!=
end; ++element )
1046 const size_t j1( element->index() );
1047 const ET2 v1( element->value() );
1049 C(i ,j) += A(i ,j1) * v1;
1050 C(i+1UL,j) += A(i+1UL,j1) * v1;
1051 C(i+2UL,j) += A(i+2UL,j1) * v1;
1052 C(i+3UL,j) += A(i+3UL,j1) * v1;
1057 for( ; (i+2UL) <= M; i+=2UL ) {
1058 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1067 const size_t nonzeros(
end - element );
1071 for(
size_t k=0UL; k<kpos; k+=4UL )
1073 const size_t j1( element->index() );
1074 const ET2 v1( element->value() );
1076 const size_t j2( element->index() );
1077 const ET2 v2( element->value() );
1079 const size_t j3( element->index() );
1080 const ET2 v3( element->value() );
1082 const size_t j4( element->index() );
1083 const ET2 v4( element->value() );
1088 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1089 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1092 for( ; element!=
end; ++element )
1094 const size_t j1( element->index() );
1095 const ET2 v1( element->value() );
1097 C(i ,j) += A(i ,j1) * v1;
1098 C(i+1UL,j) += A(i+1UL,j1) * v1;
1104 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1113 const size_t nonzeros(
end - element );
1117 for(
size_t k=0UL; k<kpos; k+=4UL )
1119 const size_t j1( element->index() );
1120 const ET2 v1( element->value() );
1122 const size_t j2( element->index() );
1123 const ET2 v2( element->value() );
1125 const size_t j3( element->index() );
1126 const ET2 v3( element->value() );
1128 const size_t j4( element->index() );
1129 const ET2 v4( element->value() );
1134 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1137 for( ; element!=
end; ++element )
1139 const size_t j1( element->index() );
1140 const ET2 v1( element->value() );
1142 C(i,j) += A(i,j1) * v1;
1166 template<
typename MT
1168 friend inline auto addAssign( Matrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1178 const ForwardFunctor fwd;
1180 addAssign( *lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1202 template<
typename MT
1204 friend inline auto subAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1219 DMatTSMatMultExpr::selectSubAssignKernel( *lhs, A, B );
1238 template<
typename MT3
1241 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1244 const size_t M( A.rows() );
1245 const size_t N( B.columns() );
1252 for( ; (i+4UL) <= M; i+=4UL ) {
1253 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1262 for( ; element!=
end; ++element ) {
1263 C(i ,j) -= A(i ,element->index()) * element->value();
1264 C(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1265 C(i+2UL,j) -= A(i+2UL,element->index()) * element->value();
1266 C(i+3UL,j) -= A(i+3UL,element->index()) * element->value();
1271 for( ; (i+2UL) <= M; i+=2UL ) {
1272 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1281 for( ; element!=
end; ++element ) {
1282 C(i ,j) -= A(i ,element->index()) * element->value();
1283 C(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1289 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1298 for( ; element!=
end; ++element )
1299 C(i,j) -= A(i,element->index()) * element->value();
1321 template<
typename MT3
1324 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1327 const size_t M( A.rows() );
1328 const size_t N( B.columns() );
1335 for( ; (i+4UL) <= M; i+=4UL ) {
1336 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1345 const size_t nonzeros(
end - element );
1349 for(
size_t k=0UL; k<kpos; k+=4UL )
1351 const size_t j1( element->index() );
1352 const ET2 v1( element->value() );
1354 const size_t j2( element->index() );
1355 const ET2 v2( element->value() );
1357 const size_t j3( element->index() );
1358 const ET2 v3( element->value() );
1360 const size_t j4( element->index() );
1361 const ET2 v4( element->value() );
1366 C(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1367 C(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1368 C(i+2UL,j) -= A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1369 C(i+3UL,j) -= A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1372 for( ; element!=
end; ++element )
1374 const size_t j1( element->index() );
1375 const ET2 v1( element->value() );
1377 C(i ,j) -= A(i ,j1) * v1;
1378 C(i+1UL,j) -= A(i+1UL,j1) * v1;
1379 C(i+2UL,j) -= A(i+2UL,j1) * v1;
1380 C(i+3UL,j) -= A(i+3UL,j1) * v1;
1385 for( ; (i+2UL) <= M; i+=2UL ) {
1386 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1395 const size_t nonzeros(
end - element );
1399 for(
size_t k=0UL; k<kpos; k+=4UL )
1401 const size_t j1( element->index() );
1402 const ET2 v1( element->value() );
1404 const size_t j2( element->index() );
1405 const ET2 v2( element->value() );
1407 const size_t j3( element->index() );
1408 const ET2 v3( element->value() );
1410 const size_t j4( element->index() );
1411 const ET2 v4( element->value() );
1416 C(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1417 C(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1420 for( ; element!=
end; ++element )
1422 const size_t j1( element->index() );
1423 const ET2 v1( element->value() );
1425 C(i ,j) -= A(i ,j1) * v1;
1426 C(i+1UL,j) -= A(i+1UL,j1) * v1;
1432 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1441 const size_t nonzeros(
end - element );
1445 for(
size_t k=0UL; k<kpos; k+=4UL )
1447 const size_t j1( element->index() );
1448 const ET2 v1( element->value() );
1450 const size_t j2( element->index() );
1451 const ET2 v2( element->value() );
1453 const size_t j3( element->index() );
1454 const ET2 v3( element->value() );
1456 const size_t j4( element->index() );
1457 const ET2 v4( element->value() );
1462 C(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1465 for( ; element!=
end; ++element )
1467 const size_t j1( element->index() );
1468 const ET2 v1( element->value() );
1470 C(i,j) -= A(i,j1) * v1;
1494 template<
typename MT
1496 friend inline auto subAssign( Matrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1506 const ForwardFunctor fwd;
1508 subAssign( *lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1530 template<
typename MT
1532 friend inline void schurAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1544 schurAssign( *lhs, tmp );
1576 template<
typename MT
1613 template<
typename MT
1632 const ForwardFunctor fwd;
1634 const TmpType tmp( rhs );
1655 template<
typename MT
1667 const ForwardFunctor fwd;
1690 template<
typename MT
1727 template<
typename MT
1739 const ForwardFunctor fwd;
1766 template<
typename MT
1803 template<
typename MT
1815 const ForwardFunctor fwd;
1839 template<
typename MT
1905template<
typename MT1
1937template<
typename MT1
1969template<
typename MT1
1972inline decltype(
auto)
1984 return ReturnType( (*lhs).rows(), (*rhs).columns() );
2020template<
typename MT1
2022inline decltype(
auto)
2027 if( (*lhs).columns() != (*rhs).rows() ) {
2031 return dmattsmatmult( *lhs, *rhs );
2068template<
typename MT1
2074inline decltype(
auto)
declsym(
const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2083 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2113template<
typename MT1
2128 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2158template<
typename MT1
2173 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2203template<
typename MT1
2246template<
typename MT1
2289template<
typename MT1
2304 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2334template<
typename MT1
2377template<
typename MT1
2420template<
typename MT1
2435 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2451template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2453 :
public Size<MT1,0UL>
2456template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2458 :
public Size<MT2,1UL>
2474template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
Header file for auxiliary alias declarations.
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition Aliases.h:310
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition Aliases.h:550
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for run time assertion macros.
Header file for the blaze::checked and blaze::unchecked instances.
Constraints on the storage order of matrix types.
Header file for the conjugate shim.
Header file for the decldiag trait.
Header file for the DeclDiag functor.
Header file for the declherm trait.
Header file for the DeclHerm functor.
Header file for the decllow trait.
Header file for the DeclLow functor.
Header file for the declsym trait.
Header file for the DeclSym functor.
Header file for the declupp trait.
Header file for the DeclUpp functor.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsBuiltin type trait.
Header file for the IsComputation type trait class.
Header file for the IsDiagonal type trait.
Header file for the IsExpression type trait class.
Header file for the IsIdentity type trait.
Header file for the IsLower type trait.
Header file for the IsResizable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsTriangular type trait.
Header file for the IsUpper type trait.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Header file for the Noop functor.
Header file for the prevMultiple shim.
Constraints on the storage order of matrix types.
Constraint on the data type.
Constraint on the data type.
Expression object for dense matrix-transpose sparse matrix multiplications.
Definition DMatTSMatMultExpr.h:129
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition DMatTSMatMultExpr.h:259
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition DMatTSMatMultExpr.h:403
const ElementType ReturnType
Return type for expression template evaluations.
Definition DMatTSMatMultExpr.h:238
If_t< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition DMatTSMatMultExpr.h:251
ElementType_t< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition DMatTSMatMultExpr.h:134
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition DMatTSMatMultExpr.h:369
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition DMatTSMatMultExpr.h:349
ElementType_t< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition DMatTSMatMultExpr.h:135
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition DMatTSMatMultExpr.h:430
If_t< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition DMatTSMatMultExpr.h:248
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition DMatTSMatMultExpr.h:284
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition DMatTSMatMultExpr.h:245
DMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatTSMatMultExpr class.
Definition DMatTSMatMultExpr.h:269
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition DMatTSMatMultExpr.h:359
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition DMatTSMatMultExpr.h:133
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition DMatTSMatMultExpr.h:333
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition DMatTSMatMultExpr.h:379
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition DMatTSMatMultExpr.h:423
MatMatMultExpr< DenseMatrix< This, false > > BaseType
Base type of this DMatTSMatMultExpr instance.
Definition DMatTSMatMultExpr.h:220
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition DMatTSMatMultExpr.h:236
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense matrix expression.
Definition DMatTSMatMultExpr.h:142
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition DMatTSMatMultExpr.h:431
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition DMatTSMatMultExpr.h:413
static constexpr bool UPP
Flag for upper matrices.
Definition DMatTSMatMultExpr.h:154
static constexpr bool LOW
Flag for lower matrices.
Definition DMatTSMatMultExpr.h:153
DMatTSMatMultExpr< MT1, MT2, SF, HF, LF, UF > This
Type of this DMatTSMatMultExpr instance.
Definition DMatTSMatMultExpr.h:217
static constexpr bool SYM
Flag for symmetric matrices.
Definition DMatTSMatMultExpr.h:151
static constexpr bool HERM
Flag for Hermitian matrices.
Definition DMatTSMatMultExpr.h:152
const ResultType CompositeType
Data type for composite expression templates.
Definition DMatTSMatMultExpr.h:239
typename If_t< HERM, DeclHermTrait< MultTrait_t< RT1, RT2 > >, If_t< SYM, DeclSymTrait< MultTrait_t< RT1, RT2 > >, If_t< LOW, If_t< UPP, DeclDiagTrait< MultTrait_t< RT1, RT2 > >, DeclLowTrait< MultTrait_t< RT1, RT2 > > >, If_t< UPP, DeclUppTrait< MultTrait_t< RT1, RT2 > >, MultTrait< RT1, RT2 > > > > >::Type ResultType
Result type for expression template evaluations.
Definition DMatTSMatMultExpr.h:223
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition DMatTSMatMultExpr.h:235
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition DMatTSMatMultExpr.h:391
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition DMatTSMatMultExpr.h:136
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition DMatTSMatMultExpr.h:132
ElementType_t< ResultType > ElementType
Resulting element type.
Definition DMatTSMatMultExpr.h:237
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition DMatTSMatMultExpr.h:256
static constexpr bool evaluateRight
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition DMatTSMatMultExpr.h:147
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition DMatTSMatMultExpr.h:242
CompositeType_t< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition DMatTSMatMultExpr.h:137
Base class for dense matrices.
Definition DenseMatrix.h:82
Base class for sparse matrices.
Definition SparseMatrix.h:77
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseMatrix base class.
Header file for the MatMatMultExpr base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1375
decltype(auto) declstrupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as strictly upper.
Definition DMatDeclStrUppExpr.h:1003
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition DMatMapExpr.h:1464
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition DMatDeclDiagExpr.h:978
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
decltype(auto) declstrlow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as strictly lower.
Definition DMatDeclStrLowExpr.h:1003
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition DMatDeclUppExpr.h:1004
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition DMatDeclLowExpr.h:1004
decltype(auto) decluniupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as uniupper.
Definition DMatDeclUniUppExpr.h:1005
decltype(auto) declherm(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as Hermitian.
Definition DMatDeclHermExpr.h:1005
decltype(auto) declsym(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as symmetric.
Definition DMatDeclSymExpr.h:1005
decltype(auto) declunilow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as unilower.
Definition DMatDeclUniLowExpr.h:1004
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition RowMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.
Definition StorageOrder.h:84
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATMULTEXPR(T1, T2)
Constraint on the data type.
Definition MatMatMultExpr.h:103
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition Zero.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition ColumnMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition Zero.h:61
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool RequiresEvaluation_v
Auxiliary variable template for the RequiresEvaluation type trait.
Definition RequiresEvaluation.h:91
constexpr bool IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.
Definition IsStrictlyUpper.h:173
constexpr bool IsSymmetric_v
Auxiliary variable template for the IsSymmetric type trait.
Definition IsSymmetric.h:172
constexpr bool IsTriangular_v
Auxiliary variable template for the IsTriangular type trait.
Definition IsTriangular.h:106
constexpr bool IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.
Definition IsStrictlyLower.h:173
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.
Definition IsUpper.h:175
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition IsDiagonal.h:148
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.
Definition IsComputation.h:90
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition IsZero.h:166
constexpr bool IsIdentity_v
Auxiliary variable template for the IsIdentity type trait.
Definition IsIdentity.h:137
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.
Definition IsLower.h:175
constexpr bool IsResizable_v
Auxiliary variable template for the IsResizable type trait.
Definition IsResizable.h:136
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition PrevMultiple.h:68
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition Matrix.h:518
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition Matrix.h:1383
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:100
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition DenseMatrix.h:194
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:131
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition Subvector.h:158
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition IsSame.h:159
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
constexpr Unchecked unchecked
Global Unchecked instance.
Definition Check.h:146
Header file for the exception macros of the math module.
Constraints on the storage order of matrix types.
Header file for all forward declarations for expression class templates.
Header file for the Size type trait.
Header file for the reset shim.
Header file for the serial shim.
Base class for all compute expression templates.
Definition Computation.h:68
Base template for the DeclDiagTrait class.
Definition DeclDiagTrait.h:127
Generic wrapper for the decldiag() function.
Definition DeclDiag.h:61
Base template for the DeclHermTrait class.
Definition DeclHermTrait.h:126
Generic wrapper for the declherm() function.
Definition DeclHerm.h:61
Base template for the DeclLowTrait class.
Definition DeclLowTrait.h:126
Generic wrapper for the decllow() function.
Definition DeclLow.h:61
Base template for the DeclSymTrait class.
Definition DeclSymTrait.h:126
Generic wrapper for the declsym() function.
Definition DeclSym.h:61
Base template for the DeclUppTrait class.
Definition DeclUppTrait.h:126
Generic wrapper for the declupp() function.
Definition DeclUpp.h:61
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Base class for all matrix/matrix multiplication expression templates.
Definition MatMatMultExpr.h:71
Base template for the MultTrait class.
Definition MultTrait.h:130
Generic wrapper for the null function.
Definition Noop.h:62
Compile time evaluation of the size of vectors and matrices.
Definition Size.h:119
System settings for performance optimizations.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.
Header file for the generic max algorithm.
Header file for the generic min algorithm.