35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATDMATMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SMATDMATMULTEXPR_H_ 140 template<
typename MT1
146 class SMatDMatMultExpr :
public DenseMatrix< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF>, false >
147 ,
private MatMatMultExpr
148 ,
private Computation
173 SYM = ( SF && !( HF || LF || UF ) ),
174 HERM = ( HF && !( LF || UF ) ),
175 LOW = ( LF || ( ( SF || HF ) && UF ) ),
176 UPP = ( UF || ( ( SF || HF ) && LF ) )
186 template<
typename T1,
typename T2,
typename T3 >
187 struct IsEvaluationRequired {
188 enum :
bool { value = ( evaluateLeft || evaluateRight ) };
198 template<
typename T1,
typename T2,
typename T3 >
199 struct UseVectorizedKernel {
202 T1::simdEnabled && T3::simdEnabled &&
219 template<
typename T1,
typename T2,
typename T3 >
220 struct UseOptimizedKernel {
222 !UseVectorizedKernel<T1,T2,T3>::value &&
235 template<
typename T1,
typename T2,
typename T3 >
236 struct UseDefaultKernel {
237 enum :
bool { value = !UseVectorizedKernel<T1,T2,T3>::value &&
238 !UseOptimizedKernel<T1,T2,T3>::value };
258 ,
Noop > > > > ForwardFunctor;
296 enum :
bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
297 !evaluateRight && MT2::smpAssignable };
352 :(
lhs_.columns() ) ) );
356 const size_t n(
end - begin );
374 inline ReturnType
at(
size_t i,
size_t j )
const {
375 if( i >=
lhs_.rows() ) {
378 if( j >=
rhs_.columns() ) {
390 inline size_t rows() const noexcept {
401 return rhs_.columns();
431 template<
typename T >
432 inline bool canAlias(
const T* alias )
const noexcept {
433 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
443 template<
typename T >
444 inline bool isAliased(
const T* alias )
const noexcept {
445 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
455 return rhs_.isAligned();
488 template<
typename MT
497 LT A(
serial( rhs.lhs_ ) );
498 RT B(
serial( rhs.rhs_ ) );
507 SMatDMatMultExpr::selectAssignKernel( ~lhs, A, B );
526 template<
typename MT3
530 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
538 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
540 const size_t jtmp(
min( jj+block, B.columns() ) );
542 for(
size_t i=0UL; i<A.rows(); ++i )
544 ConstIterator element( A.begin(i) );
545 const ConstIterator
end( A.end(i) );
547 for( ; element!=
end; ++element )
549 const size_t i1( element->index() );
553 C(i,i1) = element->value() * B(i1,i1);
563 ?( ( SYM || HERM || LOW )
566 :( SYM || HERM || LOW ?
min(i+1UL,jtmp) : jtmp ) );
573 for(
size_t j=jbegin; j<jend; ++j ) {
575 C(i,j) = element->value() * B(i1,j);
577 C(i,j) += element->value() * B(i1,j);
585 for(
size_t i=0UL; i<A.rows(); ++i ) {
586 for(
size_t j=i+1UL; j<B.columns(); ++j ) {
587 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
609 template<
typename MT3
613 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
621 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
623 const size_t jtmp(
min( jj+block, B.columns() ) );
625 for(
size_t i=0UL; i<A.rows(); ++i )
627 const ConstIterator
end( A.end(i) );
628 ConstIterator element( A.begin(i) );
630 const size_t nonzeros( A.nonZeros(i) );
631 const size_t kpos( nonzeros &
size_t(-4) );
634 for(
size_t k=0UL; k<kpos; k+=4UL )
636 const size_t i1( element->index() );
637 const ET1 v1( element->value() );
639 const size_t i2( element->index() );
640 const ET1 v2( element->value() );
642 const size_t i3( element->index() );
643 const ET1 v3( element->value() );
645 const size_t i4( element->index() );
646 const ET1 v4( element->value() );
655 :( UPP ?
max(i,jj) : jj ) );
657 ?( ( SYM || HERM || LOW )
660 :( SYM || HERM || LOW ?
min(i+1UL,jtmp) : jtmp ) );
667 const size_t jnum( jend - jbegin );
668 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
671 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
672 C(i,j ) += v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
673 C(i,j+1UL) += v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
674 C(i,j+2UL) += v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
675 C(i,j+3UL) += v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
677 for(
size_t j=jpos; j<jend; ++j ) {
678 C(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
682 for( ; element!=
end; ++element )
684 const size_t i1( element->index() );
685 const ET1 v1( element->value() );
691 :( UPP ?
max(i,jj) : jj ) );
693 ?( ( SYM || HERM || LOW )
696 :( SYM || HERM || LOW ?
min(i+1UL,jtmp) : jtmp ) );
703 const size_t jnum( jend - jbegin );
704 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
707 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
708 C(i,j ) += v1 * B(i1,j );
709 C(i,j+1UL) += v1 * B(i1,j+1UL);
710 C(i,j+2UL) += v1 * B(i1,j+2UL);
711 C(i,j+3UL) += v1 * B(i1,j+3UL);
713 for(
size_t j=jpos; j<jend; ++j ) {
714 C(i,j) += v1 * B(i1,j);
721 for(
size_t i=0UL; i<A.rows(); ++i ) {
722 for(
size_t j=i+1UL; j<B.columns(); ++j ) {
723 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
745 template<
typename MT3
749 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
757 for(
size_t i=0UL; i<A.rows(); ++i )
759 const ConstIterator
end( A.end(i) );
760 ConstIterator element( A.begin(i) );
762 const size_t nonzeros( A.nonZeros(i) );
763 const size_t kpos( nonzeros &
size_t(-4) );
766 for(
size_t k=0UL; k<kpos; k+=4UL )
768 const size_t i1( element->index() );
769 const ET1 v1( element->value() );
771 const size_t i2( element->index() );
772 const ET1 v2( element->value() );
774 const size_t i3( element->index() );
775 const ET1 v3( element->value() );
777 const size_t i4( element->index() );
778 const ET1 v4( element->value() );
783 const SIMDType xmm1(
set( v1 ) );
784 const SIMDType xmm2(
set( v2 ) );
785 const SIMDType xmm3(
set( v3 ) );
786 const SIMDType xmm4(
set( v4 ) );
790 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
791 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
792 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
795 ?( SYM || HERM || LOW ?
min(i+1UL,i4) : i4 )
796 :( SYM || HERM || LOW ?
min(i,i4)+1UL : i4+1UL ) )
797 :( SYM || HERM || LOW ? i+1UL : B.columns() ) );
800 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
801 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
805 for( ; j<jpos; j+=SIMDSIZE ) {
806 C.store( i, j, C.load(i,j) + xmm1 * B.load(i1,j) + xmm2 * B.load(i2,j) + xmm3 * B.load(i3,j) + xmm4 * B.load(i4,j) );
808 for( ; remainder && j<jend; ++j ) {
809 C(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
813 for( ; element!=
end; ++element )
815 const size_t i1( element->index() );
816 const ET1 v1( element->value() );
818 const SIMDType xmm1(
set( v1 ) );
822 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
823 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
824 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
827 ?( SYM || HERM || LOW ?
min(i+1UL,i1) : i1 )
828 :( SYM || HERM || LOW ?
min(i,i1)+1UL : i1+1UL ) )
829 :( SYM || HERM || LOW ? i+1UL : B.columns() ) );
832 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
833 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
837 for( ; j<jpos; j+=SIMDSIZE ) {
838 C.store( i, j, C.load(i,j) + xmm1 * B.load(i1,j) );
840 for( ; remainder && j<jend; ++j ) {
841 C(i,j) += v1 * B(i1,j);
847 for(
size_t i=0UL; i<A.rows(); ++i ) {
848 for(
size_t j=i+1UL; j<B.columns(); ++j ) {
849 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
870 template<
typename MT
888 const ForwardFunctor fwd;
890 const TmpType tmp(
serial( rhs ) );
891 assign( ~lhs, fwd( tmp ) );
909 template<
typename MT
918 LT A(
serial( rhs.lhs_ ) );
919 RT B(
serial( rhs.rhs_ ) );
928 SMatDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
947 template<
typename MT3
951 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
957 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
959 const size_t jtmp(
min( jj+block, B.columns() ) );
961 for(
size_t i=0UL; i<A.rows(); ++i )
963 const ConstIterator
end( A.end(i) );
964 ConstIterator element( A.begin(i) );
966 for( ; element!=
end; ++element )
968 const size_t i1( element->index() );
972 C(i,i1) += element->value() * B(i1,i1);
985 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
992 const size_t jnum( jend - jbegin );
993 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
996 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
997 C(i,j ) += element->value() * B(i1,j );
998 C(i,j+1UL) += element->value() * B(i1,j+1UL);
999 C(i,j+2UL) += element->value() * B(i1,j+2UL);
1000 C(i,j+3UL) += element->value() * B(i1,j+3UL);
1002 for(
size_t j=jpos; j<jend; ++j ) {
1003 C(i,j) += element->value() * B(i1,j);
1027 template<
typename MT3
1031 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1037 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1039 const size_t jtmp(
min( jj+block, B.columns() ) );
1041 for(
size_t i=0UL; i<A.rows(); ++i )
1043 const ConstIterator
end( A.end(i) );
1044 ConstIterator element( A.begin(i) );
1046 const size_t nonzeros( A.nonZeros(i) );
1047 const size_t kpos( nonzeros &
size_t(-4) );
1050 for(
size_t k=0UL; k<kpos; k+=4UL )
1052 const size_t i1( element->index() );
1053 const ET1 v1( element->value() );
1055 const size_t i2( element->index() );
1056 const ET1 v2( element->value() );
1058 const size_t i3( element->index() );
1059 const ET1 v3( element->value() );
1061 const size_t i4( element->index() );
1062 const ET1 v4( element->value() );
1071 :( UPP ?
max(i,jj) : jj ) );
1076 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
1083 const size_t jnum( jend - jbegin );
1084 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
1087 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
1088 C(i,j ) += v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
1089 C(i,j+1UL) += v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
1090 C(i,j+2UL) += v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
1091 C(i,j+3UL) += v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
1093 for(
size_t j=jpos; j<jend; ++j ) {
1094 C(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
1098 for( ; element!=
end; ++element )
1100 const size_t i1( element->index() );
1101 const ET1 v1( element->value() );
1107 :( UPP ?
max(i,jj) : jj ) );
1112 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
1119 const size_t jnum( jend - jbegin );
1120 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
1123 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
1124 C(i,j ) += v1 * B(i1,j );
1125 C(i,j+1UL) += v1 * B(i1,j+1UL);
1126 C(i,j+2UL) += v1 * B(i1,j+2UL);
1127 C(i,j+3UL) += v1 * B(i1,j+3UL);
1129 for(
size_t j=jpos; j<jend; ++j ) {
1130 C(i,j) += v1 * B(i1,j);
1153 template<
typename MT3
1157 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1163 for(
size_t i=0UL; i<A.rows(); ++i )
1165 const ConstIterator
end( A.end(i) );
1166 ConstIterator element( A.begin(i) );
1168 const size_t nonzeros( A.nonZeros(i) );
1169 const size_t kpos( nonzeros &
size_t(-4) );
1172 for(
size_t k=0UL; k<kpos; k+=4UL )
1174 const size_t i1( element->index() );
1175 const ET1 v1( element->value() );
1177 const size_t i2( element->index() );
1178 const ET1 v2( element->value() );
1180 const size_t i3( element->index() );
1181 const ET1 v3( element->value() );
1183 const size_t i4( element->index() );
1184 const ET1 v4( element->value() );
1189 const SIMDType xmm1(
set( v1 ) );
1190 const SIMDType xmm2(
set( v2 ) );
1191 const SIMDType xmm3(
set( v3 ) );
1192 const SIMDType xmm4(
set( v4 ) );
1196 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
1197 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
1198 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
1201 ?( LOW ?
min(i+1UL,i4) : i4 )
1202 :( LOW ?
min(i,i4)+1UL : i4+1UL ) )
1203 :( LOW ? i+1UL : B.columns() ) );
1206 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
1207 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
1211 for( ; j<jpos; j+=SIMDSIZE ) {
1212 C.store( i, j, C.load(i,j) + xmm1 * B.load(i1,j) + xmm2 * B.load(i2,j) + xmm3 * B.load(i3,j) + xmm4 * B.load(i4,j) );
1214 for( ; remainder && j<jend; ++j ) {
1215 C(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
1219 for( ; element!=
end; ++element )
1221 const size_t i1( element->index() );
1222 const ET1 v1( element->value() );
1224 const SIMDType xmm1(
set( v1 ) );
1228 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
1229 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
1230 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
1233 ?( LOW ?
min(i+1UL,i1) : i1 )
1234 :( LOW ?
min(i,i1)+1UL : i1+1UL ) )
1235 :( LOW ? i+1UL : B.columns() ) );
1238 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
1239 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
1243 for( ; j<jpos; j+=SIMDSIZE ) {
1244 C.store( i, j, C.load(i,j) + xmm1 * B.load(i1,j) );
1246 for( ; remainder && j<jend; ++j ) {
1247 C(i,j) += v1 * B(i1,j);
1272 template<
typename MT
1281 LT A(
serial( rhs.lhs_ ) );
1282 RT B(
serial( rhs.rhs_ ) );
1291 SMatDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1310 template<
typename MT3
1314 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1320 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1322 const size_t jtmp(
min( jj+block, B.columns() ) );
1324 for(
size_t i=0UL; i<A.rows(); ++i )
1326 const ConstIterator
end( A.end(i) );
1327 ConstIterator element( A.begin(i) );
1329 for( ; element!=
end; ++element )
1331 const size_t i1( element->index() );
1335 C(i,i1) -= element->value() * B(i1,i1);
1348 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
1355 const size_t jnum( jend - jbegin );
1356 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
1359 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
1360 C(i,j ) -= element->value() * B(i1,j );
1361 C(i,j+1UL) -= element->value() * B(i1,j+1UL);
1362 C(i,j+2UL) -= element->value() * B(i1,j+2UL);
1363 C(i,j+3UL) -= element->value() * B(i1,j+3UL);
1365 for(
size_t j=jpos; j<jend; ++j ) {
1366 C(i,j) -= element->value() * B(i1,j);
1390 template<
typename MT3
1394 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1400 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1402 const size_t jtmp(
min( jj+block, B.columns() ) );
1404 for(
size_t i=0UL; i<A.rows(); ++i )
1406 const ConstIterator
end( A.end(i) );
1407 ConstIterator element( A.begin(i) );
1409 const size_t nonzeros( A.nonZeros(i) );
1410 const size_t kpos( nonzeros &
size_t(-4) );
1413 for(
size_t k=0UL; k<kpos; k+=4UL )
1415 const size_t i1( element->index() );
1416 const ET1 v1( element->value() );
1418 const size_t i2( element->index() );
1419 const ET1 v2( element->value() );
1421 const size_t i3( element->index() );
1422 const ET1 v3( element->value() );
1424 const size_t i4( element->index() );
1425 const ET1 v4( element->value() );
1434 :( UPP ?
max(i,jj) : jj ) );
1439 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
1446 const size_t jnum( jend - jbegin );
1447 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
1450 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
1451 C(i,j ) -= v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
1452 C(i,j+1UL) -= v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
1453 C(i,j+2UL) -= v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
1454 C(i,j+3UL) -= v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
1456 for(
size_t j=jpos; j<jend; ++j ) {
1457 C(i,j) -= v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
1461 for( ; element!=
end; ++element )
1463 const size_t i1( element->index() );
1464 const ET1 v1( element->value() );
1470 :( UPP ?
max(i,jj) : jj ) );
1475 :( LOW ?
min(i+1UL,jtmp) : jtmp ) );
1482 const size_t jnum( jend - jbegin );
1483 const size_t jpos( jbegin + ( jnum &
size_t(-4) ) );
1486 for(
size_t j=jbegin; j<jpos; j+=4UL ) {
1487 C(i,j ) -= v1 * B(i1,j );
1488 C(i,j+1UL) -= v1 * B(i1,j+1UL);
1489 C(i,j+2UL) -= v1 * B(i1,j+2UL);
1490 C(i,j+3UL) -= v1 * B(i1,j+3UL);
1492 for(
size_t j=jpos; j<jend; ++j ) {
1493 C(i,j) -= v1 * B(i1,j);
1516 template<
typename MT3
1520 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1526 for(
size_t i=0UL; i<A.rows(); ++i )
1528 const ConstIterator
end( A.end(i) );
1529 ConstIterator element( A.begin(i) );
1531 const size_t nonzeros( A.nonZeros(i) );
1532 const size_t kpos( nonzeros &
size_t(-4) );
1535 for(
size_t k=0UL; k<kpos; k+=4UL )
1537 const size_t i1( element->index() );
1538 const ET1 v1( element->value() );
1540 const size_t i2( element->index() );
1541 const ET1 v2( element->value() );
1543 const size_t i3( element->index() );
1544 const ET1 v3( element->value() );
1546 const size_t i4( element->index() );
1547 const ET1 v4( element->value() );
1552 const SIMDType xmm1(
set( v1 ) );
1553 const SIMDType xmm2(
set( v2 ) );
1554 const SIMDType xmm3(
set( v3 ) );
1555 const SIMDType xmm4(
set( v4 ) );
1559 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
1560 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
1561 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
1564 ?( LOW ?
min(i+1UL,i4) : i4 )
1565 :( LOW ?
min(i,i4)+1UL : i4+1UL ) )
1566 :( LOW ? i+1UL : B.columns() ) );
1569 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
1570 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
1574 for( ; j<jpos; j+=SIMDSIZE ) {
1575 C.store( i, j, C.load(i,j) - xmm1 * B.load(i1,j) - xmm2 * B.load(i2,j) - xmm3 * B.load(i3,j) - xmm4 * B.load(i4,j) );
1577 for( ; remainder && j<jend; ++j ) {
1578 C(i,j) -= v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
1582 for( ; element!=
end; ++element )
1584 const size_t i1( element->index() );
1585 const ET1 v1( element->value() );
1587 const SIMDType xmm1(
set( v1 ) );
1591 ?( ( UPP ?
max(i,i1+1UL) : i1+1UL ) &
size_t(-SIMDSIZE) )
1592 :( ( UPP ?
max(i,i1) : i1 ) &
size_t(-SIMDSIZE) ) )
1593 :( UPP ? ( i &
size_t(-SIMDSIZE) ) : 0UL ) );
1596 ?( LOW ?
min(i+1UL,i1) : i1 )
1597 :( LOW ?
min(i,i1)+1UL : i1+1UL ) )
1598 :( LOW ? i+1UL : B.columns() ) );
1601 const size_t jpos( remainder ? ( jend &
size_t(-SIMDSIZE) ) : jend );
1602 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
1606 for( ; j<jpos; j+=SIMDSIZE ) {
1607 C.store( i, j, C.load(i,j) - xmm1 * B.load(i1,j) );
1609 for( ; remainder && j<jend; ++j ) {
1610 C(i,j) -= v1 * B(i1,j);
1645 template<
typename MT
1685 template<
typename MT
1704 const ForwardFunctor fwd;
1706 const TmpType tmp( rhs );
1728 template<
typename MT
1773 template<
typename MT
1860 template<
typename T1
1908 template<
typename MT1
1953 template<
typename MT1
1998 template<
typename MT1
2043 template<
typename MT1
2088 template<
typename MT1
2119 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2120 struct Rows< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> > :
public Rows<MT1>
2136 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2137 struct Columns< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> > :
public Columns<MT2>
2153 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2154 struct IsAligned< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2171 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2172 struct IsSymmetric< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2175 , IsBuiltin< ElementType_< SMatDMatMultExpr<MT1,MT2,false,true,false,false> > > >
2176 , And< Bool<LF>, Bool<UF> > >::value >
2192 template<
typename MT1,
typename MT2,
bool SF,
bool LF,
bool UF >
2193 struct IsHermitian< SMatDMatMultExpr<MT1,MT2,SF,true,LF,UF> >
2210 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2211 struct IsLower< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2213 , And< IsLower<MT1>, IsLower<MT2> >
2214 , And< Or< Bool<SF>, Bool<HF> >
2215 , IsUpper<MT1>, IsUpper<MT2> > >::value >
2231 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2232 struct IsUniLower< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2233 :
public BoolConstant< Or< And< IsUniLower<MT1>, IsUniLower<MT2> >
2234 , And< Or< Bool<SF>, Bool<HF> >
2235 , IsUniUpper<MT1>, IsUniUpper<MT2> > >::value >
2251 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2253 :
public BoolConstant< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2254 , And< IsStrictlyLower<MT2>, IsLower<MT1> >
2255 , And< Or< Bool<SF>, Bool<HF> >
2256 , Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2257 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > > > >::value >
2273 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2274 struct IsUpper< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2276 , And< IsUpper<MT1>, IsUpper<MT2> >
2277 , And< Or< Bool<SF>, Bool<HF> >
2278 , IsLower<MT1>, IsLower<MT2> > >::value >
2294 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2295 struct IsUniUpper< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2296 :
public BoolConstant< Or< And< IsUniUpper<MT1>, IsUniUpper<MT2> >
2297 , And< Or< Bool<SF>, Bool<HF> >
2298 , IsUniLower<MT1>, IsUniLower<MT2> > >::value >
2314 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2316 :
public BoolConstant< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2317 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> >
2318 , And< Or< Bool<SF>, Bool<HF> >
2319 , Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2320 , And< IsStrictlyLower<MT2>, IsLower<MT1> > > > >::value >
2336 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
typename VT >
2354 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
typename VT >
2372 template<
typename VT,
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2390 template<
typename VT,
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2408 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2425 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2442 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2459 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2476 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2493 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
bool AF >
2508 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2509 struct RowExprTrait< SMatDMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2522 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
typename SubmatrixExprTrait< MT, AF >::Type SubmatrixExprTrait_
Auxiliary alias declaration for the SubmatrixExprTrait type trait.The SubmatrixExprTrait_ alias decla...
Definition: SubmatrixExprTrait.h:134
#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
Evaluation of the expression type of a dense matrix declupp operation.Via this type trait it is possi...
Definition: DMatDeclUppExprTrait.h:75
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SMatDMatMultExpr.h:464
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1214
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Header file for mathematical functions.
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Header file for the SMatDVecMultExprTrait class template.
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
ResultType_< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:153
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:87
Header file for basic type definitions.
Header file for the DMatDeclDiagExprTrait class template.
typename TSVecDMatMultExprTrait< VT, MT >::Type TSVecDMatMultExprTrait_
Auxiliary alias declaration for the TSVecDMatMultExprTrait class template.The TSVecDMatMultExprTrait_...
Definition: TSVecDMatMultExprTrait.h:119
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SMatDMatMultExpr.h:267
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
Header file for the IsDiagonal type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Header file for the ColumnExprTrait class template.
Header file for the DeclUpp functor.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:162
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:315
SMatDMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the SMatDMatMultExpr class.
Definition: SMatDMatMultExpr.h:311
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Flag for symmetric matrices.
Definition: SMatDMatMultExpr.h:173
Header file for the IsRowVector type trait.
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Availability of a SIMD addition for the given data types.Depending on the available instruction set (...
Definition: HasSIMDAdd.h:163
RightOperand rightOperand() const noexcept
Returns the right-hand side dense matrix operand.
Definition: SMatDMatMultExpr.h:420
Header file for the TDVecSMatMultExprTrait class template.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Expression object for sparse matrix-dense matrix multiplications.The SMatDMatMultExpr class represent...
Definition: Forward.h:100
DisableIf_< IsSymmetric< MT >, const DMatDeclSymExpr< MT, SO > > declsym(const DenseMatrix< MT, SO > &dm)
Declares the given non-symmetric dense matrix expression dm as symmetric.
Definition: DMatDeclSymExpr.h:841
Evaluation of the expression type of a dense matrix/dense vector multiplication.Via this type trait i...
Definition: DMatDVecMultExprTrait.h:78
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Constraints on the storage order of matrix types.
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
Header file for the TSVecSMatMultExprTrait class template.
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
Header file for the IsUniLower type trait.
If_< IsExpression< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:279
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1802
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
CompositeType_< MT1 > CT1
Composite type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:156
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
const ElementType ReturnType
Return type for expression template evaluations.
Definition: SMatDMatMultExpr.h:272
Constraint on the data type.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Evaluation of the expression type of a dense matrix declsym operation.Via this type trait it is possi...
Definition: DMatDeclSymExprTrait.h:75
Constraint on the data type.
Constraint on the data type.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
DisableIf_< IsHermitian< MT >, const DMatDeclHermExpr< MT, SO > > declherm(const DenseMatrix< MT, SO > &dm)
Declares the given non-Hermitian dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:841
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
SubvectorExprTrait_< VT, unaligned > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:152
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse matrix operand.
Definition: SMatDMatMultExpr.h:410
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatDMatMultExpr.h:432
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Compile time check for dense vector types.This type trait tests whether or not the given template par...
Definition: IsDenseVector.h:78
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the DeclLow functor.
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
#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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Generic wrapper for the decllow() function.
Definition: DeclLow.h:58
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Header file for the Or class template.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatDMatMultExpr.h:374
#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 HasSIMDAdd type trait.
Header file for the DenseMatrix base class.
Header file for the DMatDeclLowExprTrait class template.
Header file for the Columns type trait.
Flag for lower matrices.
Definition: SMatDMatMultExpr.h:175
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
Evaluation of the expression type of a dense matrix/sparse vector multiplication.Via this type trait ...
Definition: DMatSVecMultExprTrait.h:80
ElementType_< RT1 > ET1
Element type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:154
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: SMatDMatMultExpr.h:282
Header file for the DMatDVecMultExprTrait class template.
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
Generic wrapper for the null function.
Definition: Noop.h:58
Header file for the IsTriangular type trait.
Header file for the DMatDeclUppExprTrait class template.
Header file for the DMatDeclSymExprTrait class template.
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:80
Constraints on the storage order of matrix types.
typename TDVecDMatMultExprTrait< VT, MT >::Type TDVecDMatMultExprTrait_
Auxiliary alias declaration for the TDVecDMatMultExprTrait class template.The TDVecDMatMultExprTrait_...
Definition: TDVecDMatMultExprTrait.h:119
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
SIMDTrait_< ElementType > SIMDType
Resulting SIMD element type.
Definition: SMatDMatMultExpr.h:271
Header file for the exception macros of the math module.
DisableIf_< IsLower< MT >, const DMatDeclLowExpr< MT, SO > > decllow(const DenseMatrix< MT, SO > &dm)
Declares the given non-lower dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:842
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatDMatMultExpr.h:273
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the DeclDiag functor.
Evaluation of the expression type of a dense matrix declherm operation.Via this type trait it is poss...
Definition: DMatDeclHermExprTrait.h:75
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:78
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
ResultType_< MT1 > RT1
Result type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:152
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatDMatMultExpr.h:326
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
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:109
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
CompositeType_< MT2 > CT2
Composite type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:157
If_< IsExpression< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:276
Header file for the conjugate shim.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the IsSIMDCombinable type trait.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatDMatMultExpr.h:400
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for the HasSIMDMult type trait.
Header file for run time assertion macros.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatDMatMultExpr.h:390
Utility type for generic codes.
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: SMatDMatMultExpr.h:471
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the reset shim.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
Header file for the DMatDeclHermExprTrait class template.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatDMatMultExpr.h:444
Constraints on the storage order of matrix types.
Generic wrapper for the declherm() function.
Definition: DeclHerm.h:58
typename SMatDVecMultExprTrait< MT, VT >::Type SMatDVecMultExprTrait_
Auxiliary alias declaration for the SMatDVecMultExprTrait class template.The SMatDVecMultExprTrait_ a...
Definition: SMatDVecMultExprTrait.h:119
Header file for the Noop functor.
Header file for the RemoveReference type trait.
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatDMatMultExpr.h:268
Flag for upper matrices.
Definition: SMatDMatMultExpr.h:176
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
#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
Header file for the IsDenseVector type trait.
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:58
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
SMatDMatMultExpr< MT1, MT2, SF, HF, LF, UF > This
Type of this SMatDMatMultExpr instance.
Definition: SMatDMatMultExpr.h:265
Evaluation of the expression type of a dense vector/dense matrix multiplication.Via this type trait i...
Definition: TDVecDMatMultExprTrait.h:78
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: SMatDMatMultExpr.h:454
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatDMatMultExpr.h:269
Evaluation of the expression type of a sparse vector/dense matrix multiplication.Via this type trait ...
Definition: TSVecDMatMultExprTrait.h:78
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
Header file for the TDVecDMatMultExprTrait class template.
Compile time logical or evaluation.The Or class template performs at compile time a logical or ('&&')...
Definition: Or.h:101
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
Evaluation of the expression type of a dense matrix decllow operation.Via this type trait it is possi...
Definition: DMatDeclLowExprTrait.h:75
Generic wrapper for the decldiag() function.
Definition: DeclDiag.h:58
Evaluation of the expression type of a dense matrix decldiag operation.Via this type trait it is poss...
Definition: DMatDeclDiagExprTrait.h:75
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
Header file for the TSVecDMatMultExprTrait class template.
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
Header file for the DeclHerm functor.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
ElementType_< RT2 > ET2
Element type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:155
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: SMatDMatMultExpr.h:285
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the DMatSVecMultExprTrait class template.
Header file for the IsColumnVector type trait.
Constraint on the data type.
Generic wrapper for the declsym() function.
Definition: DeclSym.h:58
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
Header file for the IsResizable type trait.
const DMatDMatMultExpr< T1, T2, false, false, false, false > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7505
Flag for Hermitian matrices.
Definition: SMatDMatMultExpr.h:174
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
DisableIf_< IsDiagonal< MT >, const DMatDeclDiagExpr< MT, SO > > decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given non-diagonal dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:841
DisableIf_< IsUpper< MT >, const DMatDeclUppExpr< MT, SO > > declupp(const DenseMatrix< MT, SO > &dm)
Declares the given non-upper dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:842
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:78
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the Bool class template.
Header file for the DeclSym functor.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: SMatDMatMultExpr.h:472
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SMatDMatMultExpr.h:270