35#ifndef _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
124template<
typename MT1
131 :
public MatMatMultExpr< DenseMatrix< TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, true > >
146 static constexpr bool evaluateLeft = ( IsComputation_v<MT1> || RequiresEvaluation_v<MT1> );
151 static constexpr bool evaluateRight = ( IsComputation_v<MT2> || RequiresEvaluation_v<MT2> );
155 static constexpr bool SYM = ( SF && !( HF || LF || UF ) );
156 static constexpr bool HERM = ( HF && !( LF || UF ) );
157 static constexpr bool LOW = ( LF || ( ( SF || HF ) && UF ) );
158 static constexpr bool UPP = ( UF || ( ( SF || HF ) && LF ) );
167 template<
typename T1,
typename T2,
typename T3 >
177 template<
typename T1,
typename T2,
typename T3 >
178 static constexpr bool UseVectorizedKernel_v =
179 ( useOptimizedKernels &&
181 T1::simdEnabled && T2::simdEnabled &&
182 IsColumnMajorMatrix_v<T1> &&
183 IsSIMDCombinable_v< ElementType_t<T1>
197 template<
typename T1,
typename T2,
typename T3 >
198 static constexpr bool UseOptimizedKernel_v =
199 ( useOptimizedKernels &&
200 !UseVectorizedKernel_v<T1,T2,T3> &&
202 !IsResizable_v< ElementType_t<T1> > &&
203 !IsResizable_v<ET2> );
212 template<
typename T1,
typename T2,
typename T3 >
213 static constexpr bool UseDefaultKernel_v =
214 ( !UseVectorizedKernel_v<T1,T2,T3> && !UseOptimizedKernel_v<T1,T2,T3> );
281 ( !IsDiagonal_v<MT1> &&
283 HasSIMDAdd_v<ET1,ET2> &&
284 HasSIMDMult_v<ET1,ET2> );
321 if( IsDiagonal_v<MT1> ) {
324 else if( IsDiagonal_v<MT2> ) {
327 else if( IsTriangular_v<MT1> || IsTriangular_v<MT2> ) {
328 const size_t begin( ( IsUpper_v<MT1> )
329 ?( ( IsLower_v<MT2> )
330 ?(
max( ( IsStrictlyUpper_v<MT1> ? i+1UL : i )
331 , ( IsStrictlyLower_v<MT2> ? j+1UL : j ) ) )
332 :( IsStrictlyUpper_v<MT1> ? i+1UL : i ) )
333 :( ( IsLower_v<MT2> )
334 ?( IsStrictlyLower_v<MT2> ? j+1UL : j )
336 const size_t end( ( IsLower_v<MT1> )
337 ?( ( IsUpper_v<MT2> )
338 ?(
min( ( IsStrictlyLower_v<MT1> ? i : i+1UL )
339 , ( IsStrictlyUpper_v<MT2> ? j : j+1UL ) ) )
340 :( IsStrictlyLower_v<MT1> ? i : i+1UL ) )
341 :( ( IsUpper_v<MT2> )
342 ?( IsStrictlyUpper_v<MT2> ? j : j+1UL )
343 :(
lhs_.columns() ) ) );
367 if( i >=
lhs_.rows() ) {
370 if( j >=
rhs_.columns() ) {
382 inline size_t rows() const noexcept {
393 return rhs_.columns();
423 template<
typename T >
424 inline bool canAlias(
const T* alias )
const noexcept {
425 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
435 template<
typename T >
436 inline bool isAliased(
const T* alias )
const noexcept {
437 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
447 return lhs_.isAligned();
457 return (
rows() *
columns() >= SMP_TDMATTSMATMULT_THRESHOLD ) && !IsDiagonal_v<MT1>;
480 template<
typename MT
499 TDMatTSMatMultExpr::selectAssignKernel( *lhs, A, B );
518 template<
typename MT3
521 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
524 const size_t block( IsColumnMajorMatrix_v<MT3> || IsDiagonal_v<MT4> ? A.rows() : 64UL );
528 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
530 const size_t itmp(
min( ii+block, A.rows() ) );
532 for(
size_t j=0UL; j<B.columns(); ++j )
534 auto element( B.begin(j) );
535 const auto end( B.end(j) );
537 for( ; element!=
end; ++element )
539 const size_t j1( element->index() );
541 if( IsDiagonal_v<MT4> )
543 C(j1,j) = A(j1,j1) * element->value();
547 const size_t ibegin( ( IsLower_v<MT4> )
549 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
550 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
551 :(
LOW ?
max(j,ii) : ii ) );
552 const size_t iend( ( IsUpper_v<MT4> )
554 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
555 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
558 if( (
SYM ||
HERM ||
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
563 for(
size_t i=ibegin; i<iend; ++i ) {
565 C(i,j) = A(i,j1) * element->value();
567 C(i,j) += A(i,j1) * element->value();
575 for(
size_t j=0UL; j<B.columns(); ++j ) {
576 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
577 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
599 template<
typename MT3
602 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
603 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
605 const size_t block( IsColumnMajorMatrix_v<MT3> ? A.rows() : 64UL );
609 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
611 const size_t itmp(
min( ii+block, A.rows() ) );
613 for(
size_t j=0UL; j<B.columns(); ++j )
615 const auto end( B.end(j) );
616 auto element( B.begin(j) );
618 const size_t nonzeros( B.nonZeros(j) );
622 for(
size_t k=0UL; k<kpos; k+=4UL )
624 const size_t j1( element->index() );
625 const ET2 v1( element->value() );
627 const size_t j2( element->index() );
628 const ET2 v2( element->value() );
630 const size_t j3( element->index() );
631 const ET2 v3( element->value() );
633 const size_t j4( element->index() );
634 const ET2 v4( element->value() );
639 const size_t ibegin( ( IsLower_v<MT4> )
641 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
642 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
643 :(
LOW ?
max(j,ii) : ii ) );
644 const size_t iend( ( IsUpper_v<MT4> )
646 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) )
647 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) ) )
650 if( (
SYM ||
HERM ||
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
655 const size_t inum( iend - ibegin );
656 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
659 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
660 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
661 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
662 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
663 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
665 for(
size_t i=ipos; i<iend; ++i ) {
666 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
670 for( ; element!=
end; ++element )
672 const size_t j1( element->index() );
673 const ET2 v1( element->value() );
675 const size_t ibegin( ( IsLower_v<MT4> )
677 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
678 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
679 :(
LOW ?
max(j,ii) : ii ) );
680 const size_t iend( ( IsUpper_v<MT4> )
682 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
683 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
686 if( (
SYM ||
HERM ||
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
691 const size_t inum( iend - ibegin );
692 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
695 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
696 C(i ,j) += A(i ,j1) * v1;
697 C(i+1UL,j) += A(i+1UL,j1) * v1;
698 C(i+2UL,j) += A(i+2UL,j1) * v1;
699 C(i+3UL,j) += A(i+3UL,j1) * v1;
701 for(
size_t i=ipos; i<iend; ++i ) {
702 C(i,j) += A(i,j1) * v1;
709 for(
size_t j=0UL; j<B.columns(); ++j ) {
710 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
711 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
733 template<
typename MT3
736 static inline auto selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
737 -> EnableIf_t< UseVectorizedKernel_v<MT3,MT4,MT5> >
739 constexpr bool remainder( !IsPadded_v<MT3> || !IsPadded_v<MT4> );
743 for(
size_t j=0UL; j<B.columns(); ++j )
745 const auto end( B.end(j) );
746 auto element( B.begin(j) );
748 const size_t nonzeros( B.nonZeros(j) );
752 for(
size_t k=0UL; k<kpos; k+=4UL )
754 const size_t j1( element->index() );
755 const ET2 v1( element->value() );
757 const size_t j2( element->index() );
758 const ET2 v2( element->value() );
760 const size_t j3( element->index() );
761 const ET2 v3( element->value() );
763 const size_t j4( element->index() );
764 const ET2 v4( element->value() );
774 const size_t ibegin( ( IsLower_v<MT4> )
775 ?( ( IsStrictlyLower_v<MT4> )
779 const size_t iend( ( IsUpper_v<MT4> )
780 ?( ( IsStrictlyUpper_v<MT4> )
792 C.store( i, j, C.load(i,j) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
794 for( ; remainder && i<iend; ++i ) {
795 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
799 for( ; element!=
end; ++element )
801 const size_t j1( element->index() );
802 const ET2 v1( element->value() );
806 const size_t ibegin( ( IsLower_v<MT4> )
807 ?( ( IsStrictlyLower_v<MT4> )
811 const size_t iend( ( IsUpper_v<MT4> )
812 ?( ( IsStrictlyUpper_v<MT4> )
824 C.store( i, j, C.load(i,j) + A.load(i,j1) * xmm1 );
826 for( ; remainder && i<iend; ++i ) {
827 C(i,j) += A(i,j1) * v1;
833 for(
size_t j=0UL; j<B.columns(); ++j ) {
834 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
835 C(i,j) =
HERM ?
conj( C(j,i) ) : C(j,i);
856 template<
typename MT
862 using TmpType = If_t< SO, ResultType, OppositeType >;
874 const ForwardFunctor fwd;
876 const TmpType tmp(
serial( rhs ) );
877 assign( *lhs, fwd( tmp ) );
895 template<
typename MT
897 friend inline void addAssign( DenseMatrix<MT,SO>& lhs,
const TDMatTSMatMultExpr& rhs )
914 TDMatTSMatMultExpr::selectAddAssignKernel( *lhs, A, B );
933 template<
typename MT3
936 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
937 -> EnableIf_t< UseDefaultKernel_v<MT3,MT4,MT5> >
939 const size_t block( IsColumnMajorMatrix_v<MT3> || IsDiagonal_v<MT4> ? A.rows() : 64UL );
941 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
943 const size_t itmp(
min( ii+block, A.rows() ) );
945 for(
size_t j=0UL; j<B.columns(); ++j )
947 auto element( B.begin(j) );
948 const auto end( B.end(j) );
950 for( ; element!=
end; ++element )
952 const size_t j1( element->index() );
954 if( IsDiagonal_v<MT4> )
956 C(j1,j) += A(j1,j1) * element->value();
960 const size_t ibegin( ( IsLower_v<MT4> )
962 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
963 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
964 :(
LOW ?
max(j,ii) : ii ) );
965 const size_t iend( ( IsUpper_v<MT4> )
967 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
968 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
969 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
971 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
976 const size_t inum( iend - ibegin );
977 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
980 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
981 C(i ,j) += A(i ,j1) * element->value();
982 C(i+1UL,j) += A(i+1UL,j1) * element->value();
983 C(i+2UL,j) += A(i+2UL,j1) * element->value();
984 C(i+3UL,j) += A(i+3UL,j1) * element->value();
986 for(
size_t i=ipos; i<iend; ++i ) {
987 C(i,j) += A(i,j1) * element->value();
1011 template<
typename MT3
1014 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1015 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
1017 const size_t block( IsColumnMajorMatrix_v<MT3> ? A.rows() : 64UL );
1019 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
1021 const size_t itmp(
min( ii+block, A.rows() ) );
1023 for(
size_t j=0UL; j<B.columns(); ++j )
1025 const auto end( B.end(j) );
1026 auto element( B.begin(j) );
1028 const size_t nonzeros( B.nonZeros(j) );
1032 for(
size_t k=0UL; k<kpos; k+=4UL )
1034 const size_t j1( element->index() );
1035 const ET2 v1( element->value() );
1037 const size_t j2( element->index() );
1038 const ET2 v2( element->value() );
1040 const size_t j3( element->index() );
1041 const ET2 v3( element->value() );
1043 const size_t j4( element->index() );
1044 const ET2 v4( element->value() );
1049 const size_t ibegin( ( IsLower_v<MT4> )
1051 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
1052 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
1053 :(
LOW ?
max(j,ii) : ii ) );
1054 const size_t iend( ( IsUpper_v<MT4> )
1056 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) )
1057 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) ) )
1058 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
1060 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
1065 const size_t inum( iend - ibegin );
1066 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
1069 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1070 C(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1071 C(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1072 C(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1073 C(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1075 for(
size_t i=ipos; i<iend; ++i ) {
1076 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1080 for( ; element!=
end; ++element )
1082 const size_t j1( element->index() );
1083 const ET2 v1( element->value() );
1085 const size_t ibegin( ( IsLower_v<MT4> )
1087 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
1088 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
1089 :(
LOW ?
max(j,ii) : ii ) );
1090 const size_t iend( ( IsUpper_v<MT4> )
1092 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
1093 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
1094 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
1096 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
1101 const size_t inum( iend - ibegin );
1102 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
1105 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1106 C(i ,j) += A(i ,j1) * v1;
1107 C(i+1UL,j) += A(i+1UL,j1) * v1;
1108 C(i+2UL,j) += A(i+2UL,j1) * v1;
1109 C(i+3UL,j) += A(i+3UL,j1) * v1;
1111 for(
size_t i=ipos; i<iend; ++i ) {
1112 C(i,j) += A(i,j1) * v1;
1135 template<
typename MT3
1138 static inline auto selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1139 -> EnableIf_t< UseVectorizedKernel_v<MT3,MT4,MT5> >
1141 constexpr bool remainder( !IsPadded_v<MT3> || !IsPadded_v<MT4> );
1143 for(
size_t j=0UL; j<B.columns(); ++j )
1145 const auto end( B.end(j) );
1146 auto element( B.begin(j) );
1148 const size_t nonzeros( B.nonZeros(j) );
1152 for(
size_t k=0UL; k<kpos; k+=4UL )
1154 const size_t j1( element->index() );
1155 const ET2 v1( element->value() );
1157 const size_t j2( element->index() );
1158 const ET2 v2( element->value() );
1160 const size_t j3( element->index() );
1161 const ET2 v3( element->value() );
1163 const size_t j4( element->index() );
1164 const ET2 v4( element->value() );
1174 const size_t ibegin( ( IsLower_v<MT4> )
1175 ?( ( IsStrictlyLower_v<MT4> )
1179 const size_t iend( ( IsUpper_v<MT4> )
1180 ?( ( IsStrictlyUpper_v<MT4> )
1181 ?(
UPP ?
max(j+1UL,j4) : j4 )
1182 :(
UPP ?
max(j,j4)+1UL : j4+1UL ) )
1183 :(
UPP ? j+1UL : A.rows() ) );
1192 C.store( i, j, C.load(i,j) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
1194 for( ; remainder && i<iend; ++i ) {
1195 C(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1199 for( ; element!=
end; ++element )
1201 const size_t j1( element->index() );
1202 const ET2 v1( element->value() );
1206 const size_t ibegin( ( IsLower_v<MT4> )
1207 ?( ( IsStrictlyLower_v<MT4> )
1211 const size_t iend( ( IsUpper_v<MT4> )
1212 ?( ( IsStrictlyUpper_v<MT4> )
1213 ?(
UPP ?
max(j+1UL,j1) : j1 )
1214 :(
UPP ?
max(j,j1)+1UL : j1+1UL ) )
1215 :(
UPP ? j+1UL : A.rows() ) );
1224 C.store( i, j, C.load(i,j) + A.load(i,j1) * xmm1 );
1226 for( ; remainder && i<iend; ++i ) {
1227 C(i,j) += A(i,j1) * v1;
1252 template<
typename MT
1254 friend inline void subAssign( DenseMatrix<MT,SO>& lhs,
const TDMatTSMatMultExpr& rhs )
1271 TDMatTSMatMultExpr::selectSubAssignKernel( *lhs, A, B );
1290 template<
typename MT3
1293 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1294 -> EnableIf_t< UseDefaultKernel_v<MT3,MT4,MT5> >
1296 const size_t block( IsColumnMajorMatrix_v<MT3> || IsDiagonal_v<MT4> ? A.rows() : 64UL );
1298 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
1300 const size_t itmp(
min( ii+block, A.rows() ) );
1302 for(
size_t j=0UL; j<B.columns(); ++j )
1304 auto element( B.begin(j) );
1305 const auto end( B.end(j) );
1307 for( ; element!=
end; ++element )
1309 const size_t j1( element->index() );
1311 if( IsDiagonal_v<MT4> )
1313 C(j1,j) -= A(j1,j1) * element->value();
1317 const size_t ibegin( ( IsLower_v<MT4> )
1319 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
1320 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
1321 :(
LOW ?
max(j,ii) : ii ) );
1322 const size_t iend( ( IsUpper_v<MT4> )
1324 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
1325 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
1326 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
1328 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
1333 const size_t inum( iend - ibegin );
1334 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
1337 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1338 C(i ,j) -= A(i ,j1) * element->value();
1339 C(i+1UL,j) -= A(i+1UL,j1) * element->value();
1340 C(i+2UL,j) -= A(i+2UL,j1) * element->value();
1341 C(i+3UL,j) -= A(i+3UL,j1) * element->value();
1343 for(
size_t i=ipos; i<iend; ++i ) {
1344 C(i,j) -= A(i,j1) * element->value();
1368 template<
typename MT3
1371 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1372 -> EnableIf_t< UseOptimizedKernel_v<MT3,MT4,MT5> >
1374 const size_t block( IsColumnMajorMatrix_v<MT3> ? A.rows() : 64UL );
1376 for(
size_t ii=0UL; ii<A.rows(); ii+=block )
1378 const size_t itmp(
min( ii+block, A.rows() ) );
1380 for(
size_t j=0UL; j<B.columns(); ++j )
1382 const auto end( B.end(j) );
1383 auto element( B.begin(j) );
1385 const size_t nonzeros( B.nonZeros(j) );
1389 for(
size_t k=0UL; k<kpos; k+=4UL )
1391 const size_t j1( element->index() );
1392 const ET2 v1( element->value() );
1394 const size_t j2( element->index() );
1395 const ET2 v2( element->value() );
1397 const size_t j3( element->index() );
1398 const ET2 v3( element->value() );
1400 const size_t j4( element->index() );
1401 const ET2 v4( element->value() );
1406 const size_t ibegin( ( IsLower_v<MT4> )
1408 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
1409 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
1410 :(
LOW ?
max(j,ii) : ii ) );
1411 const size_t iend( ( IsUpper_v<MT4> )
1413 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) )
1414 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j4 : j4+1UL ) ) ) )
1415 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
1417 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
1422 const size_t inum( iend - ibegin );
1423 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
1426 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1427 C(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1428 C(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1429 C(i+2UL,j) -= A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1430 C(i+3UL,j) -= A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1432 for(
size_t i=ipos; i<iend; ++i ) {
1433 C(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1437 for( ; element!=
end; ++element )
1439 const size_t j1( element->index() );
1440 const ET2 v1( element->value() );
1442 const size_t ibegin( ( IsLower_v<MT4> )
1444 ?(
max( j, ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) )
1445 :(
max( ii, ( IsStrictlyLower_v<MT4> ? j1+1UL : j1 ) ) ) )
1446 :(
LOW ?
max(j,ii) : ii ) );
1447 const size_t iend( ( IsUpper_v<MT4> )
1449 ?(
min( j+1UL, itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) )
1450 :(
min( itmp, ( IsStrictlyUpper_v<MT4> ? j1 : j1+1UL ) ) ) )
1451 :(
UPP ?
min(j+1UL,itmp) : itmp ) );
1453 if( (
LOW ||
UPP || IsTriangular_v<MT4> ) && ( ibegin >= iend ) )
1458 const size_t inum( iend - ibegin );
1459 const size_t ipos( ibegin +
prevMultiple( inum, 4UL ) );
1462 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1463 C(i ,j) -= A(i ,j1) * v1;
1464 C(i+1UL,j) -= A(i+1UL,j1) * v1;
1465 C(i+2UL,j) -= A(i+2UL,j1) * v1;
1466 C(i+3UL,j) -= A(i+3UL,j1) * v1;
1468 for(
size_t i=ipos; i<iend; ++i ) {
1469 C(i,j) -= A(i,j1) * v1;
1492 template<
typename MT3
1495 static inline auto selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1496 -> EnableIf_t< UseVectorizedKernel_v<MT3,MT4,MT5> >
1498 constexpr bool remainder( !IsPadded_v<MT3> || !IsPadded_v<MT4> );
1500 for(
size_t j=0UL; j<B.columns(); ++j )
1502 const auto end( B.end(j) );
1503 auto element( B.begin(j) );
1505 const size_t nonzeros( B.nonZeros(j) );
1509 for(
size_t k=0UL; k<kpos; k+=4UL )
1511 const size_t j1( element->index() );
1512 const ET2 v1( element->value() );
1514 const size_t j2( element->index() );
1515 const ET2 v2( element->value() );
1517 const size_t j3( element->index() );
1518 const ET2 v3( element->value() );
1520 const size_t j4( element->index() );
1521 const ET2 v4( element->value() );
1531 const size_t ibegin( ( IsLower_v<MT4> )
1532 ?( ( IsStrictlyLower_v<MT4> )
1536 const size_t iend( ( IsUpper_v<MT4> )
1537 ?( ( IsStrictlyUpper_v<MT4> )
1538 ?(
UPP ?
max(j+1UL,j4) : j4 )
1539 :(
UPP ?
max(j,j4)+1UL : j4+1UL ) )
1540 :(
UPP ? j+1UL : A.rows() ) );
1549 C.store( i, j, C.load(i,j) - A.load(i,j1) * xmm1 - A.load(i,j2) * xmm2 - A.load(i,j3) * xmm3 - A.load(i,j4) * xmm4 );
1551 for( ; remainder && i<iend; ++i ) {
1552 C(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1556 for( ; element!=
end; ++element )
1558 const size_t j1( element->index() );
1559 const ET2 v1( element->value() );
1563 const size_t ibegin( ( IsLower_v<MT4> )
1564 ?( ( IsStrictlyLower_v<MT4> )
1568 const size_t iend( ( IsUpper_v<MT4> )
1569 ?( ( IsStrictlyUpper_v<MT4> )
1570 ?(
UPP ?
max(j+1UL,j1) : j1 )
1571 :(
UPP ?
max(j,j1)+1UL : j1+1UL ) )
1572 :(
UPP ? j+1UL : A.rows() ) );
1581 C.store( i, j, C.load(i,j) - A.load(i,j1) * xmm1 );
1583 for( ; remainder && i<iend; ++i ) {
1584 C(i,j) -= A(i,j1) * v1;
1609 template<
typename MT
1611 friend inline void schurAssign( DenseMatrix<MT,SO>& lhs,
const TDMatTSMatMultExpr& rhs )
1623 schurAssign( *lhs, tmp );
1655 template<
typename MT
1658 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1695 template<
typename MT
1698 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1702 using TmpType = If_t< SO, ResultType, OppositeType >;
1714 const ForwardFunctor fwd;
1716 const TmpType tmp( rhs );
1737 template<
typename MT
1740 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1781 template<
typename MT
1784 -> EnableIf_t< IsEvaluationRequired_v<MT,MT1,MT2> >
1823 template<
typename MT
1889template<
typename MT1
1892 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > ) ||
1893 IsZero_v<MT2> >* =
nullptr >
1894inline const TDMatTSMatMultExpr<MT1,MT2,false,false,false,false>
1895 tdmattsmatmult(
const DenseMatrix<MT1,true>& lhs,
const SparseMatrix<MT2,true>& rhs )
1901 return TDMatTSMatMultExpr<MT1,MT2,false,false,false,false>( *lhs, *rhs );
1921template<
typename MT1
1923 , EnableIf_t< IsIdentity_v<MT2> &&
1924 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* =
nullptr >
1926 tdmattsmatmult(
const DenseMatrix<MT1,true>& lhs,
const SparseMatrix<MT2,true>& rhs )
1953template<
typename MT1
1955 , EnableIf_t< IsZero_v<MT2> >* =
nullptr >
1956inline decltype(
auto)
1957 tdmattsmatmult(
const DenseMatrix<MT1,true>& lhs,
const SparseMatrix<MT2,true>& rhs )
1963 using ReturnType =
const MultTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1968 return ReturnType( (*lhs).rows(), (*rhs).columns() );
2003template<
typename MT1
2005inline decltype(
auto)
2010 if( (*lhs).columns() != (*rhs).rows() ) {
2014 return tdmattsmatmult( *lhs, *rhs );
2051template<
typename MT1
2057inline decltype(
auto)
declsym(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2065 using ReturnType =
const TDMatTSMatMultExpr<MT1,MT2,true,HF,LF,UF>;
2066 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2096template<
typename MT1
2102inline decltype(
auto)
declherm(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2110 using ReturnType =
const TDMatTSMatMultExpr<MT1,MT2,SF,true,LF,UF>;
2111 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2141template<
typename MT1
2147inline decltype(
auto)
decllow(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2155 using ReturnType =
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,true,UF>;
2156 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2186template<
typename MT1
2191inline decltype(
auto)
declunilow(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,false,UF>& dm )
2229template<
typename MT1
2234inline decltype(
auto)
declstrlow(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,false,UF>& dm )
2272template<
typename MT1
2278inline decltype(
auto)
declupp(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2286 using ReturnType =
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,true>;
2287 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2317template<
typename MT1
2322inline decltype(
auto)
decluniupp(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,false>& dm )
2360template<
typename MT1
2365inline decltype(
auto)
declstrupp(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,false>& dm )
2403template<
typename MT1
2409inline decltype(
auto)
decldiag(
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>& dm )
2417 using ReturnType =
const TDMatTSMatMultExpr<MT1,MT2,SF,HF,true,true>;
2418 return ReturnType( dm.leftOperand(), dm.rightOperand() );
2434template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2435struct Size< TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 0UL >
2436 :
public Size<MT1,0UL>
2439template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2440struct Size< TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, 1UL >
2441 :
public Size<MT2,1UL>
2457template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2458struct IsAligned< TDMatTSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2459 :
public IsAligned<MT1>
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
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 HasSIMDAdd type trait.
Header file for the HasSIMDMult type trait.
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 IsColumnMajorMatrix type trait.
Header file for the IsComputation type trait class.
Header file for the isDefault shim.
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 IsPadded type trait.
Header file for the IsResizable type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper 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.
Header file for all SIMD functionality.
Constraint on the data type.
Base class for dense matrices.
Definition: DenseMatrix.h:82
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse matrices.
Definition: SparseMatrix.h:77
Expression object for transpose dense matrix-transpose sparse matrix multiplications.
Definition: TDMatTSMatMultExpr.h:133
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: TDMatTSMatMultExpr.h:293
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:262
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: TDMatTSMatMultExpr.h:287
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatTSMatMultExpr.h:402
ElementType_t< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:138
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: TDMatTSMatMultExpr.h:280
CompositeType_t< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:141
static constexpr bool SYM
Flag for symmetric matrices.
Definition: TDMatTSMatMultExpr.h:155
static constexpr bool LOW
Flag for lower matrices.
Definition: TDMatTSMatMultExpr.h:157
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:140
TDMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the TDMatTSMatMultExpr class.
Definition: TDMatTSMatMultExpr.h:302
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatTSMatMultExpr.h:456
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:412
static constexpr bool UPP
Flag for upper matrices.
Definition: TDMatTSMatMultExpr.h:158
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: TDMatTSMatMultExpr.h:260
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TDMatTSMatMultExpr.h:436
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:146
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatTSMatMultExpr.h:446
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:259
If_t< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:275
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:258
ElementType_t< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:139
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatTSMatMultExpr.h:263
If_t< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatTSMatMultExpr.h:272
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: TDMatTSMatMultExpr.h:366
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: TDMatTSMatMultExpr.h:256
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:463
static constexpr bool HERM
Flag for Hermitian matrices.
Definition: TDMatTSMatMultExpr.h:156
static constexpr bool evaluateRight
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:151
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:464
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:266
SIMDTrait_t< ElementType > SIMDType
Resulting SIMD element type.
Definition: TDMatTSMatMultExpr.h:261
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:136
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatTSMatMultExpr.h:424
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:137
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: TDMatTSMatMultExpr.h:392
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: TDMatTSMatMultExpr.h:382
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:269
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TDMatTSMatMultExpr.h:317
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) 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
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
#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
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
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.
Definition: SIMDTrait.h:315
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
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#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
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
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
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
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.