35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_ 120 template<
typename MT1
127 :
public MatMatMultExpr< DenseMatrix< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, false > >
142 static constexpr
bool evaluateLeft = ( IsComputation_v<MT1> || RequiresEvaluation_v<MT1> );
147 static constexpr
bool evaluateRight = ( IsComputation_v<MT2> || RequiresEvaluation_v<MT2> );
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 >
165 static constexpr
bool CanExploitSymmetry_v = IsSymmetric_v<T2>;
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 &&
190 !IsResizable_v< ElementType_t<T1> > &&
191 !IsResizable_v<ET2> );
288 if( IsDiagonal_v<MT1> ) {
291 else if( IsDiagonal_v<MT2> ) {
294 else if( IsTriangular_v<MT1> || IsTriangular_v<MT2> ) {
295 const size_t begin( ( IsUpper_v<MT1> )
296 ?( ( IsLower_v<MT2> )
297 ?(
max( ( IsStrictlyUpper_v<MT1> ? i+1UL : i )
298 , ( IsStrictlyLower_v<MT2> ? j+1UL : j ) ) )
299 :( IsStrictlyUpper_v<MT1> ? i+1UL : i ) )
300 :( ( IsLower_v<MT2> )
301 ?( IsStrictlyLower_v<MT2> ? j+1UL : j )
303 const size_t end( ( IsLower_v<MT1> )
304 ?( ( IsUpper_v<MT2> )
305 ?(
min( ( IsStrictlyLower_v<MT1> ? i : i+1UL )
306 , ( IsStrictlyUpper_v<MT2> ? j : j+1UL ) ) )
307 :( IsStrictlyLower_v<MT1> ? i : i+1UL ) )
308 :( ( IsUpper_v<MT2> )
309 ?( IsStrictlyUpper_v<MT2> ? j : j+1UL )
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();
424 return (
rows() *
columns() >= SMP_DMATTSMATMULT_THRESHOLD ) && !IsDiagonal_v<MT1>;
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 )
504 auto element( ( IsUpper_v<MT4> )
505 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
507 const auto end( ( IsLower_v<MT4> )
508 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,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 )
536 auto element( ( IsUpper_v<MT4> )
537 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
539 const auto end( ( IsLower_v<MT4> )
540 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,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 )
562 auto element( ( IsUpper_v<MT4> )
563 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
565 const auto end( ( IsLower_v<MT4> )
566 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,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 )
625 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
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 )
640 auto element( ( IsUpper_v<MT4> )
641 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
643 const auto end( ( IsLower_v<MT4> )
644 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
647 const size_t nonzeros(
end - element );
648 const size_t kpos( nonzeros &
size_t(-4) );
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 )
690 auto element( ( IsUpper_v<MT4> )
691 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
693 const auto end( ( IsLower_v<MT4> )
694 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
697 const size_t nonzeros(
end - element );
698 const size_t kpos( nonzeros &
size_t(-4) );
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 )
736 auto element( ( IsUpper_v<MT4> )
737 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
739 const auto end( ( IsLower_v<MT4> )
740 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
743 const size_t nonzeros(
end - element );
744 const size_t kpos( nonzeros &
size_t(-4) );
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 )
805 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
809 using TmpType = If_t< SO, OppositeType, ResultType >;
821 const ForwardFunctor fwd;
823 const TmpType tmp(
serial( rhs ) );
824 assign( ~lhs, fwd( tmp ) );
844 template<
typename MT
847 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
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 )
877 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
891 DMatTSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
910 template<
typename MT3
913 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
914 -> DisableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
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 )
927 auto element( ( IsUpper_v<MT4> )
928 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
930 const auto end( ( IsLower_v<MT4> )
931 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,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 )
946 auto element( ( IsUpper_v<MT4> )
947 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
949 const auto end( ( IsLower_v<MT4> )
950 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,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 )
963 auto element( ( IsUpper_v<MT4> )
964 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
966 const auto end( ( IsLower_v<MT4> )
967 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,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 )
997 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
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 )
1010 auto element( ( IsUpper_v<MT4> )
1011 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1013 const auto end( ( IsLower_v<MT4> )
1014 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1017 const size_t nonzeros(
end - element );
1018 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1060 auto element( ( IsUpper_v<MT4> )
1061 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1063 const auto end( ( IsLower_v<MT4> )
1064 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
1067 const size_t nonzeros(
end - element );
1068 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1106 auto element( ( IsUpper_v<MT4> )
1107 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1109 const auto end( ( IsLower_v<MT4> )
1110 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
1113 const size_t nonzeros(
end - element );
1114 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1169 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
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 )
1205 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1219 DMatTSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1238 template<
typename MT3
1241 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1242 -> DisableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
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 )
1255 auto element( ( IsUpper_v<MT4> )
1256 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1258 const auto end( ( IsLower_v<MT4> )
1259 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,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 )
1274 auto element( ( IsUpper_v<MT4> )
1275 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1277 const auto end( ( IsLower_v<MT4> )
1278 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,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 )
1291 auto element( ( IsUpper_v<MT4> )
1292 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1294 const auto end( ( IsLower_v<MT4> )
1295 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,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 )
1325 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
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 )
1338 auto element( ( IsUpper_v<MT4> )
1339 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1341 const auto end( ( IsLower_v<MT4> )
1342 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1345 const size_t nonzeros(
end - element );
1346 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1388 auto element( ( IsUpper_v<MT4> )
1389 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1391 const auto end( ( IsLower_v<MT4> )
1392 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
1395 const size_t nonzeros(
end - element );
1396 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1434 auto element( ( IsUpper_v<MT4> )
1435 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1437 const auto end( ( IsLower_v<MT4> )
1438 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
1441 const size_t nonzeros(
end - element );
1442 const size_t kpos( nonzeros &
size_t(-4) );
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 )
1497 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
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
1579 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1613 template<
typename MT
1616 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1620 using TmpType = If_t< SO, OppositeType, ResultType >;
1632 const ForwardFunctor fwd;
1634 const TmpType tmp( rhs );
1655 template<
typename MT
1658 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1667 const ForwardFunctor fwd;
1690 template<
typename MT
1693 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1727 template<
typename MT
1730 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1739 const ForwardFunctor fwd;
1766 template<
typename MT
1769 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1803 template<
typename MT
1806 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1815 const ForwardFunctor fwd;
1839 template<
typename MT
1905 template<
typename MT1
1908 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > ) ||
1909 IsZero_v<MT2> >* =
nullptr >
1910 inline const DMatTSMatMultExpr<MT1,MT2,false,false,false,false>
1911 dmattsmatmult(
const DenseMatrix<MT1,false>& lhs,
const SparseMatrix<MT2,true>& rhs )
1917 return DMatTSMatMultExpr<MT1,MT2,false,false,false,false>( ~lhs, ~rhs );
1937 template<
typename MT1
1939 , EnableIf_t< IsIdentity_v<MT2> &&
1940 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* =
nullptr >
1942 dmattsmatmult(
const DenseMatrix<MT1,false>& lhs,
const SparseMatrix<MT2,true>& rhs )
1969 template<
typename MT1
1971 , EnableIf_t< IsZero_v<MT2> >* =
nullptr >
1972 inline decltype(
auto)
1973 dmattsmatmult( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,true>& rhs )
1979 using ReturnType =
const MultTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1984 return ReturnType( (~lhs).
rows(), (~rhs).
columns() );
2020 template<
typename MT1
2022 inline decltype(
auto)
2031 return dmattsmatmult( ~lhs, ~rhs );
2068 template<
typename MT1
2074 inline decltype(
auto)
declsym( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2082 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,true,HF,LF,UF>;
2083 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2113 template<
typename MT1
2119 inline decltype(
auto)
declherm( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2127 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,true,LF,UF>;
2128 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2158 template<
typename MT1
2164 inline decltype(
auto)
decllow( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2172 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,true,UF>;
2173 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2203 template<
typename MT1
2209 inline decltype(
auto)
declupp( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2217 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,true>;
2218 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2248 template<
typename MT1
2254 inline decltype(
auto)
decldiag( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2262 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,true,true>;
2263 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2279 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2280 struct Size< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 0UL >
2281 :
public Size<MT1,0UL>
2284 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2285 struct Size< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 1UL >
2286 :
public Size<MT2,1UL>
2302 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2303 struct IsAligned< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2304 :
public IsAligned<MT1>
#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:133
Headerfile for the generic min algorithm.
Header file for the blaze::checked and blaze::unchecked instances.
Header file for the decldiag trait.
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:975
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
Header file for the declherm trait.
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatTSMatMultExpr.h:359
Header file for the serial shim.
Header file for the IsDiagonal type trait.
Base template for the DeclUppTrait class.
Definition: DeclUppTrait.h:134
If_t< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: DMatTSMatMultExpr.h:251
#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
ElementType_t< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:134
Header file for the DeclUpp functor.
Header file for the IsSame and IsStrictlySame type traits.
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
DMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatTSMatMultExpr class.
Definition: DMatTSMatMultExpr.h:269
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatTSMatMultExpr.h:369
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
Constraint on the data type.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatTSMatMultExpr.h:333
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:154
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:142
Header file for the MAYBE_UNUSED function template.
Header file for the IsIdentity type trait.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatTSMatMultExpr.h:423
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1001
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:233
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:132
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Header file for the reset shim.
Constraints on the storage order of matrix types.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DMatTSMatMultExpr.h:237
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes....
Definition: Forward.h:145
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatTSMatMultExpr.h:236
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:133
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTSMatMultExpr.h:235
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatTSMatMultExpr.h:256
Constraint on the data type.
Constraint on the data type.
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: DMatTSMatMultExpr.h:431
If_t< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: DMatTSMatMultExpr.h:248
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.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatTSMatMultExpr.h:403
Header file for the If class template.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatTSMatMultExpr.h:391
#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
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is not a zero vector or matrix type,...
Definition: Zero.h:61
Generic wrapper for the decllow() function.
Definition: DeclLow.h:59
static constexpr bool HERM
Flag for Hermitian matrices.
Definition: DMatTSMatMultExpr.h:152
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:1162
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatTSMatMultExpr.h:259
Header file for the decllow trait.
#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.
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition: DMatTSMatMultExpr.h:379
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1001
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:136
Header file for the IsLower type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
Header file for the IsAligned type trait.
static constexpr bool SYM
Flag for symmetric matrices.
Definition: DMatTSMatMultExpr.h:151
Generic wrapper for the null function.
Definition: Noop.h:60
Header file for the IsTriangular type trait.
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:134
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
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:1198
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatTSMatMultExpr.h:349
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:438
Header file for the DeclDiag functor.
ElementType_t< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:135
Constraint on the data type.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatTSMatMultExpr.h:413
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:103
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
Header file for the conjugate shim.
Header file for the declupp trait.
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:245
Base class for all matrix/matrix multiplication expression templates.The MatMatMultExpr class serves ...
Definition: MatMatMultExpr.h:67
static constexpr bool LOW
Flag for lower matrices.
Definition: DMatTSMatMultExpr.h:153
#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,...
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
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:134
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
Base template for the MultTrait class.
Definition: MultTrait.h:146
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) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatTSMatMultExpr.h:430
Header file for the IsZero type trait.
Header file for the declsym trait.
#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
Header file for all forward declarations for expression class templates.
decltype(auto) declsym(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as symmetric.
Definition: DMatDeclSymExpr.h:1002
Expression object for dense matrix-transpose sparse matrix multiplications.The DMatTSMatMultExpr clas...
Definition: DMatTSMatMultExpr.h:126
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
Constraint on the data type.
Constraints on the storage order of matrix types.
Generic wrapper for the declherm() function.
Definition: DeclHerm.h:59
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
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
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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
CompositeType_t< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:137
#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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: DMatTSMatMultExpr.h:238
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:59
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatTSMatMultExpr.h:239
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:134
decltype(auto) declherm(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:1002
static constexpr bool UPP
Flag for upper matrices.
Definition: DMatTSMatMultExpr.h:154
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
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
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
Header file for the IntegralConstant class template.
Generic wrapper for the decldiag() function.
Definition: DeclDiag.h:59
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:242
Header file for the DeclHerm functor.
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1324
Constraint on the data type.
Generic wrapper for the declsym() function.
Definition: DeclSym.h:59
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:134
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
Header file for the IsResizable type trait.
static constexpr bool evaluateRight
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:147
Header file for the Size type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is a zero vector or matrix type,...
Definition: Zero.h:81
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,...
Definition: Assert.h:101
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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTSMatMultExpr.h:284
Header file for the IsExpression type trait class.
Header file for the function trace functionality.