35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATTSMATMULTEXPR_H_ 121 template<
typename MT1
128 :
public MatMatMultExpr< DenseMatrix< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, false > >
143 static constexpr
bool evaluateLeft = ( IsComputation_v<MT1> || RequiresEvaluation_v<MT1> );
148 static constexpr
bool evaluateRight = ( IsComputation_v<MT2> || RequiresEvaluation_v<MT2> );
152 static constexpr
bool SYM = ( SF && !( HF || LF || UF ) );
153 static constexpr
bool HERM = ( HF && !( LF || UF ) );
154 static constexpr
bool LOW = ( LF || ( ( SF || HF ) && UF ) );
155 static constexpr
bool UPP = ( UF || ( ( SF || HF ) && LF ) );
165 template<
typename T1,
typename T2,
typename T3 >
166 static constexpr
bool CanExploitSymmetry_v = IsSymmetric_v<T2>;
176 template<
typename T1,
typename T2,
typename T3 >
177 static constexpr
bool IsEvaluationRequired_v =
187 template<
typename T1,
typename T2,
typename T3 >
188 static constexpr
bool UseOptimizedKernel_v =
189 ( useOptimizedKernels &&
191 !IsResizable_v< ElementType_t<T1> > &&
192 !IsResizable_v<ET2> );
289 if( IsDiagonal_v<MT1> ) {
292 else if( IsDiagonal_v<MT2> ) {
295 else if( IsTriangular_v<MT1> || IsTriangular_v<MT2> ) {
296 const size_t begin( ( IsUpper_v<MT1> )
297 ?( ( IsLower_v<MT2> )
298 ?(
max( ( IsStrictlyUpper_v<MT1> ? i+1UL : i )
299 , ( IsStrictlyLower_v<MT2> ? j+1UL : j ) ) )
300 :( IsStrictlyUpper_v<MT1> ? i+1UL : i ) )
301 :( ( IsLower_v<MT2> )
302 ?( IsStrictlyLower_v<MT2> ? j+1UL : j )
304 const size_t end( ( IsLower_v<MT1> )
305 ?( ( IsUpper_v<MT2> )
306 ?(
min( ( IsStrictlyLower_v<MT1> ? i : i+1UL )
307 , ( IsStrictlyUpper_v<MT2> ? j : j+1UL ) ) )
308 :( IsStrictlyLower_v<MT1> ? i : i+1UL ) )
309 :( ( IsUpper_v<MT2> )
310 ?( IsStrictlyUpper_v<MT2> ? j : j+1UL )
311 :(
lhs_.columns() ) ) );
335 if( i >=
lhs_.rows() ) {
338 if( j >=
rhs_.columns() ) {
350 inline size_t rows() const noexcept {
361 return rhs_.columns();
391 template<
typename T >
392 inline bool canAlias(
const T* alias )
const noexcept {
393 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
403 template<
typename T >
404 inline bool isAliased(
const T* alias )
const noexcept {
405 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
415 return lhs_.isAligned();
425 return (
rows() *
columns() >= SMP_DMATTSMATMULT_THRESHOLD ) && !IsDiagonal_v<MT1>;
448 template<
typename MT
465 DMatTSMatMultExpr::selectAssignKernel( ~lhs, A, B );
484 template<
typename MT3
487 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
490 const size_t M( A.rows() );
491 const size_t N( B.columns() );
502 for( ; (i+4UL) <= M; i+=4UL ) {
503 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
505 auto element( ( IsUpper_v<MT4> )
506 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
508 const auto end( ( IsLower_v<MT4> )
509 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
512 if( element ==
end ) {
520 C(i ,j) = A(i ,element->index()) * element->value();
521 C(i+1UL,j) = A(i+1UL,element->index()) * element->value();
522 C(i+2UL,j) = A(i+2UL,element->index()) * element->value();
523 C(i+3UL,j) = A(i+3UL,element->index()) * element->value();
525 for( ; element!=
end; ++element ) {
526 C(i ,j) += A(i ,element->index()) * element->value();
527 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
528 C(i+2UL,j) += A(i+2UL,element->index()) * element->value();
529 C(i+3UL,j) += A(i+3UL,element->index()) * element->value();
534 for( ; (i+2UL) <= M; i+=2UL ) {
535 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
537 auto element( ( IsUpper_v<MT4> )
538 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
540 const auto end( ( IsLower_v<MT4> )
541 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
544 if( element ==
end ) {
550 C(i ,j) = A(i ,element->index()) * element->value();
551 C(i+1UL,j) = A(i+1UL,element->index()) * element->value();
553 for( ; element!=
end; ++element ) {
554 C(i ,j) += A(i ,element->index()) * element->value();
555 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
561 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
563 auto element( ( IsUpper_v<MT4> )
564 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
566 const auto end( ( IsLower_v<MT4> )
567 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
570 if( element ==
end ) {
575 C(i,j) = A(i,element->index()) * element->value();
577 for( ; element!=
end; ++element )
578 C(i,j) += A(i,element->index()) * element->value();
584 for(
size_t i=1UL; i<M; ++i ) {
585 for(
size_t j=0UL; j<i; ++j ) {
586 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
591 for(
size_t j=1UL; j<N; ++j ) {
592 for(
size_t i=0UL; i<j; ++i ) {
598 for(
size_t i=1UL; i<M; ++i ) {
599 for(
size_t j=0UL; j<i; ++j ) {
622 template<
typename MT3
625 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
626 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
628 const size_t M( A.rows() );
629 const size_t N( B.columns() );
638 for( ; (i+4UL) <= M; i+=4UL ) {
639 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
641 auto element( ( IsUpper_v<MT4> )
642 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
644 const auto end( ( IsLower_v<MT4> )
645 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
648 const size_t nonzeros(
end - element );
649 const size_t kpos( nonzeros &
size_t(-4) );
652 for(
size_t k=0UL; k<kpos; k+=4UL )
654 const size_t j1( element->index() );
655 const ET2 v1( element->value() );
657 const size_t j2( element->index() );
658 const ET2 v2( element->value() );
660 const size_t j3( element->index() );
661 const ET2 v3( element->value() );
663 const size_t j4( element->index() );
664 const ET2 v4( element->value() );
669 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
670 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
671 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
672 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
675 for( ; element!=
end; ++element )
677 const size_t j1( element->index() );
678 const ET2 v1( element->value() );
680 C(i ,j) += A(i ,j1) * v1;
681 C(i+1UL,j) += A(i+1UL,j1) * v1;
682 C(i+2UL,j) += A(i+2UL,j1) * v1;
683 C(i+3UL,j) += A(i+3UL,j1) * v1;
688 for( ; (i+2UL) <= M; i+=2UL ) {
689 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
691 auto element( ( IsUpper_v<MT4> )
692 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
694 const auto end( ( IsLower_v<MT4> )
695 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
698 const size_t nonzeros(
end - element );
699 const size_t kpos( nonzeros &
size_t(-4) );
702 for(
size_t k=0UL; k<kpos; k+=4UL )
704 const size_t j1( element->index() );
705 const ET2 v1( element->value() );
707 const size_t j2( element->index() );
708 const ET2 v2( element->value() );
710 const size_t j3( element->index() );
711 const ET2 v3( element->value() );
713 const size_t j4( element->index() );
714 const ET2 v4( element->value() );
719 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
720 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
723 for( ; element!=
end; ++element )
725 const size_t j1( element->index() );
726 const ET2 v1( element->value() );
728 C(i ,j) += A(i ,j1) * v1;
729 C(i+1UL,j) += A(i+1UL,j1) * v1;
735 for(
size_t j=(
SYM ||
HERM ||
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
737 auto element( ( IsUpper_v<MT4> )
738 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
740 const auto end( ( IsLower_v<MT4> )
741 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
744 const size_t nonzeros(
end - element );
745 const size_t kpos( nonzeros &
size_t(-4) );
748 for(
size_t k=0UL; k<kpos; k+=4UL )
750 const size_t j1( element->index() );
751 const ET2 v1( element->value() );
753 const size_t j2( element->index() );
754 const ET2 v2( element->value() );
756 const size_t j3( element->index() );
757 const ET2 v3( element->value() );
759 const size_t j4( element->index() );
760 const ET2 v4( element->value() );
765 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
768 for( ; element!=
end; ++element )
770 const size_t j1( element->index() );
771 const ET2 v1( element->value() );
773 C(i,j) += A(i,j1) * v1;
780 for(
size_t i=1UL; i<M; ++i ) {
781 for(
size_t j=0UL; j<i; ++j ) {
782 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
803 template<
typename MT
805 friend inline auto assign( SparseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
806 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
810 using TmpType = If_t< SO, OppositeType, ResultType >;
822 const ForwardFunctor fwd;
824 const TmpType tmp(
serial( rhs ) );
825 assign( ~lhs, fwd( tmp ) );
845 template<
typename MT
848 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
855 const ForwardFunctor fwd;
857 assign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
875 template<
typename MT
877 friend inline auto addAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
878 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
892 DMatTSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
911 template<
typename MT3
914 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
915 -> DisableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
917 const size_t M( A.rows() );
918 const size_t N( B.columns() );
925 for( ; (i+4UL) <= M; i+=4UL ) {
926 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
928 auto element( ( IsUpper_v<MT4> )
929 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
931 const auto end( ( IsLower_v<MT4> )
932 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
935 for( ; element!=
end; ++element ) {
936 C(i ,j) += A(i ,element->index()) * element->value();
937 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
938 C(i+2UL,j) += A(i+2UL,element->index()) * element->value();
939 C(i+3UL,j) += A(i+3UL,element->index()) * element->value();
944 for( ; (i+2UL) <= M; i+=2UL ) {
945 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
947 auto element( ( IsUpper_v<MT4> )
948 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
950 const auto end( ( IsLower_v<MT4> )
951 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
954 for( ; element!=
end; ++element ) {
955 C(i ,j) += A(i ,element->index()) * element->value();
956 C(i+1UL,j) += A(i+1UL,element->index()) * element->value();
962 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
964 auto element( ( IsUpper_v<MT4> )
965 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
967 const auto end( ( IsLower_v<MT4> )
968 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
971 for( ; element!=
end; ++element )
972 C(i,j) += A(i,element->index()) * element->value();
994 template<
typename MT3
997 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
998 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
1000 const size_t M( A.rows() );
1001 const size_t N( B.columns() );
1008 for( ; (i+4UL) <= M; i+=4UL ) {
1009 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1011 auto element( ( IsUpper_v<MT4> )
1012 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1014 const auto end( ( IsLower_v<MT4> )
1015 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1018 const size_t nonzeros(
end - element );
1019 const size_t kpos( nonzeros &
size_t(-4) );
1022 for(
size_t k=0UL; k<kpos; k+=4UL )
1024 const size_t j1( element->index() );
1025 const ET2 v1( element->value() );
1027 const size_t j2( element->index() );
1028 const ET2 v2( element->value() );
1030 const size_t j3( element->index() );
1031 const ET2 v3( element->value() );
1033 const size_t j4( element->index() );
1034 const ET2 v4( element->value() );
1039 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1040 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1041 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1042 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1045 for( ; element!=
end; ++element )
1047 const size_t j1( element->index() );
1048 const ET2 v1( element->value() );
1050 C(i ,j) += A(i ,j1) * v1;
1051 C(i+1UL,j) += A(i+1UL,j1) * v1;
1052 C(i+2UL,j) += A(i+2UL,j1) * v1;
1053 C(i+3UL,j) += A(i+3UL,j1) * v1;
1058 for( ; (i+2UL) <= M; i+=2UL ) {
1059 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1061 auto element( ( IsUpper_v<MT4> )
1062 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1064 const auto end( ( IsLower_v<MT4> )
1065 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
1068 const size_t nonzeros(
end - element );
1069 const size_t kpos( nonzeros &
size_t(-4) );
1072 for(
size_t k=0UL; k<kpos; k+=4UL )
1074 const size_t j1( element->index() );
1075 const ET2 v1( element->value() );
1077 const size_t j2( element->index() );
1078 const ET2 v2( element->value() );
1080 const size_t j3( element->index() );
1081 const ET2 v3( element->value() );
1083 const size_t j4( element->index() );
1084 const ET2 v4( element->value() );
1089 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1090 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1093 for( ; element!=
end; ++element )
1095 const size_t j1( element->index() );
1096 const ET2 v1( element->value() );
1098 C(i ,j) += A(i ,j1) * v1;
1099 C(i+1UL,j) += A(i+1UL,j1) * v1;
1105 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1107 auto element( ( IsUpper_v<MT4> )
1108 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1110 const auto end( ( IsLower_v<MT4> )
1111 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
1114 const size_t nonzeros(
end - element );
1115 const size_t kpos( nonzeros &
size_t(-4) );
1118 for(
size_t k=0UL; k<kpos; k+=4UL )
1120 const size_t j1( element->index() );
1121 const ET2 v1( element->value() );
1123 const size_t j2( element->index() );
1124 const ET2 v2( element->value() );
1126 const size_t j3( element->index() );
1127 const ET2 v3( element->value() );
1129 const size_t j4( element->index() );
1130 const ET2 v4( element->value() );
1135 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1138 for( ; element!=
end; ++element )
1140 const size_t j1( element->index() );
1141 const ET2 v1( element->value() );
1143 C(i,j) += A(i,j1) * v1;
1167 template<
typename MT
1169 friend inline auto addAssign( Matrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1170 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1179 const ForwardFunctor fwd;
1181 addAssign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1203 template<
typename MT
1205 friend inline auto subAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1206 -> DisableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1220 DMatTSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1239 template<
typename MT3
1242 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1243 -> DisableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
1245 const size_t M( A.rows() );
1246 const size_t N( B.columns() );
1253 for( ; (i+4UL) <= M; i+=4UL ) {
1254 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1256 auto element( ( IsUpper_v<MT4> )
1257 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1259 const auto end( ( IsLower_v<MT4> )
1260 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1263 for( ; element!=
end; ++element ) {
1264 C(i ,j) -= A(i ,element->index()) * element->value();
1265 C(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1266 C(i+2UL,j) -= A(i+2UL,element->index()) * element->value();
1267 C(i+3UL,j) -= A(i+3UL,element->index()) * element->value();
1272 for( ; (i+2UL) <= M; i+=2UL ) {
1273 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1275 auto element( ( IsUpper_v<MT4> )
1276 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1278 const auto end( ( IsLower_v<MT4> )
1279 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
1282 for( ; element!=
end; ++element ) {
1283 C(i ,j) -= A(i ,element->index()) * element->value();
1284 C(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1290 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1292 auto element( ( IsUpper_v<MT4> )
1293 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1295 const auto end( ( IsLower_v<MT4> )
1296 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
1299 for( ; element!=
end; ++element )
1300 C(i,j) -= A(i,element->index()) * element->value();
1322 template<
typename MT3
1325 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1326 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
1328 const size_t M( A.rows() );
1329 const size_t N( B.columns() );
1336 for( ; (i+4UL) <= M; i+=4UL ) {
1337 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+4UL : N ); ++j )
1339 auto element( ( IsUpper_v<MT4> )
1340 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1342 const auto end( ( IsLower_v<MT4> )
1343 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1346 const size_t nonzeros(
end - element );
1347 const size_t kpos( nonzeros &
size_t(-4) );
1350 for(
size_t k=0UL; k<kpos; k+=4UL )
1352 const size_t j1( element->index() );
1353 const ET2 v1( element->value() );
1355 const size_t j2( element->index() );
1356 const ET2 v2( element->value() );
1358 const size_t j3( element->index() );
1359 const ET2 v3( element->value() );
1361 const size_t j4( element->index() );
1362 const ET2 v4( element->value() );
1367 C(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1368 C(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1369 C(i+2UL,j) -= A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1370 C(i+3UL,j) -= A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1373 for( ; element!=
end; ++element )
1375 const size_t j1( element->index() );
1376 const ET2 v1( element->value() );
1378 C(i ,j) -= A(i ,j1) * v1;
1379 C(i+1UL,j) -= A(i+1UL,j1) * v1;
1380 C(i+2UL,j) -= A(i+2UL,j1) * v1;
1381 C(i+3UL,j) -= A(i+3UL,j1) * v1;
1386 for( ; (i+2UL) <= M; i+=2UL ) {
1387 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+2UL : N ); ++j )
1389 auto element( ( IsUpper_v<MT4> )
1390 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1392 const auto end( ( IsLower_v<MT4> )
1393 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i+2UL,j) : B.upperBound(i+2UL,j) )
1396 const size_t nonzeros(
end - element );
1397 const size_t kpos( nonzeros &
size_t(-4) );
1400 for(
size_t k=0UL; k<kpos; k+=4UL )
1402 const size_t j1( element->index() );
1403 const ET2 v1( element->value() );
1405 const size_t j2( element->index() );
1406 const ET2 v2( element->value() );
1408 const size_t j3( element->index() );
1409 const ET2 v3( element->value() );
1411 const size_t j4( element->index() );
1412 const ET2 v4( element->value() );
1417 C(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1418 C(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1421 for( ; element!=
end; ++element )
1423 const size_t j1( element->index() );
1424 const ET2 v1( element->value() );
1426 C(i ,j) -= A(i ,j1) * v1;
1427 C(i+1UL,j) -= A(i+1UL,j1) * v1;
1433 for(
size_t j=(
UPP ? i : 0UL ); j<(
LOW ? i+1UL : N ); ++j )
1435 auto element( ( IsUpper_v<MT4> )
1436 ?( IsStrictlyUpper_v<MT4> ? B.upperBound(i,j) : B.lowerBound(i,j) )
1438 const auto end( ( IsLower_v<MT4> )
1439 ?( IsStrictlyLower_v<MT4> ? B.lowerBound(i,j) : B.upperBound(i,j) )
1442 const size_t nonzeros(
end - element );
1443 const size_t kpos( nonzeros &
size_t(-4) );
1446 for(
size_t k=0UL; k<kpos; k+=4UL )
1448 const size_t j1( element->index() );
1449 const ET2 v1( element->value() );
1451 const size_t j2( element->index() );
1452 const ET2 v2( element->value() );
1454 const size_t j3( element->index() );
1455 const ET2 v3( element->value() );
1457 const size_t j4( element->index() );
1458 const ET2 v4( element->value() );
1463 C(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1466 for( ; element!=
end; ++element )
1468 const size_t j1( element->index() );
1469 const ET2 v1( element->value() );
1471 C(i,j) -= A(i,j1) * v1;
1495 template<
typename MT
1497 friend inline auto subAssign( Matrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1498 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1507 const ForwardFunctor fwd;
1509 subAssign( ~lhs, fwd(
trans( rhs.lhs_ ) * rhs.rhs_ ) );
1531 template<
typename MT
1533 friend inline void schurAssign( DenseMatrix<MT,SO>& lhs,
const DMatTSMatMultExpr& rhs )
1545 schurAssign( ~lhs, tmp );
1577 template<
typename MT
1580 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1614 template<
typename MT
1617 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1621 using TmpType = If_t< SO, OppositeType, ResultType >;
1633 const ForwardFunctor fwd;
1635 const TmpType tmp( rhs );
1656 template<
typename MT
1659 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1668 const ForwardFunctor fwd;
1691 template<
typename MT
1694 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1728 template<
typename MT
1731 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1740 const ForwardFunctor fwd;
1767 template<
typename MT
1770 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1804 template<
typename MT
1807 -> EnableIf_t< CanExploitSymmetry_v<MT,MT1,MT2> >
1816 const ForwardFunctor fwd;
1840 template<
typename MT
1906 template<
typename MT1
1908 , DisableIf_t< ( IsIdentity_v<MT2> &&
1909 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > ) ||
1910 IsZero_v<MT2> >* =
nullptr >
1911 inline const DMatTSMatMultExpr<MT1,MT2,false,false,false,false>
1912 dmattsmatmult(
const DenseMatrix<MT1,false>& lhs,
const SparseMatrix<MT2,true>& rhs )
1918 return DMatTSMatMultExpr<MT1,MT2,false,false,false,false>( ~lhs, ~rhs );
1938 template<
typename MT1
1940 , EnableIf_t< IsIdentity_v<MT2> &&
1941 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* =
nullptr >
1943 dmattsmatmult(
const DenseMatrix<MT1,false>& lhs,
const SparseMatrix<MT2,true>& rhs )
1970 template<
typename MT1
1972 , EnableIf_t< IsZero_v<MT2> >* =
nullptr >
1973 inline decltype(
auto)
1974 dmattsmatmult( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,true>& rhs )
1980 using ReturnType =
const MultTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
2021 template<
typename MT1
2023 inline decltype(
auto)
2032 return dmattsmatmult( ~lhs, ~rhs );
2069 template<
typename MT1
2075 inline decltype(
auto)
declsym( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2083 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,true,HF,LF,UF>;
2084 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2114 template<
typename MT1
2120 inline decltype(
auto)
declherm( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2128 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,true,LF,UF>;
2129 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2159 template<
typename MT1
2165 inline decltype(
auto)
decllow( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2173 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,true,UF>;
2174 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2204 template<
typename MT1
2210 inline decltype(
auto)
declupp( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2218 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,true>;
2219 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2249 template<
typename MT1
2255 inline decltype(
auto)
decldiag( const DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2263 using ReturnType =
const DMatTSMatMultExpr<MT1,MT2,SF,HF,true,true>;
2264 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2280 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2281 struct Size< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 0UL >
2282 :
public Size<MT1,0UL>
2285 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2286 struct Size< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 1UL >
2287 :
public Size<MT2,1UL>
2303 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2304 struct IsAligned< DMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2305 :
public IsAligned<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: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 the UNUSED_PARAMETER function template.
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
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:360
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:252
#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:135
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:591
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
DMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatTSMatMultExpr class.
Definition: DMatTSMatMultExpr.h:270
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatTSMatMultExpr.h:370
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:334
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:143
Header file for the IsIdentity type trait.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatTSMatMultExpr.h:424
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1002
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:234
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:133
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:238
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
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:237
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatTSMatMultExpr.h:134
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTSMatMultExpr.h:236
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatTSMatMultExpr.h:257
Constraint on the data type.
Constraint on the data type.
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: DMatTSMatMultExpr.h:432
If_t< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: DMatTSMatMultExpr.h:249
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:404
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:392
#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:58
static constexpr bool HERM
Flag for Hermitian matrices.
Definition: DMatTSMatMultExpr.h:153
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:1147
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatTSMatMultExpr.h:260
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:380
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1002
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:137
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
static constexpr bool SYM
Flag for symmetric matrices.
Definition: DMatTSMatMultExpr.h:152
Generic wrapper for the null function.
Definition: Noop.h:59
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:1179
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatTSMatMultExpr.h:350
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:136
Constraint on the data type.
Header file for all forward declarations for expression class templates.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatTSMatMultExpr.h:414
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:246
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:154
#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
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:431
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
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:127
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:58
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:138
#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:239
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:58
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
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:240
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:155
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:58
If_t< IsExpression_v< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatMultExpr.h:243
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:1326
Constraint on the data type.
Generic wrapper for the declsym() function.
Definition: DeclSym.h:58
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:148
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, 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 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:285
Header file for the TrueType type/value trait base class.
Header file for the IsExpression type trait class.
Header file for the function trace functionality.