35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
121 template<
typename MT1
123 class TDMatTSMatMultExpr :
public DenseMatrix< TDMatTSMatMultExpr<MT1,MT2>, true >
124 ,
private MatMatMultExpr
125 ,
private Computation
155 template<
typename T1,
typename T2,
typename T3 >
156 struct CanExploitSymmetry {
157 enum { value = IsRowMajorMatrix<T1>::value &&
158 ( IsSymmetric<T2>::value || IsSymmetric<T3>::value ) };
169 template<
typename T1,
typename T2,
typename T3 >
170 struct IsEvaluationRequired {
171 enum { value = ( evaluateLeft || evaluateRight ) &&
172 !CanExploitSymmetry<T1,T2,T3>::value };
182 template<
typename T1,
typename T2,
typename T3 >
183 struct UseVectorizedKernel {
184 enum { value = !IsDiagonal<T2>::value &&
185 T1::vectorizable && T2::vectorizable &&
186 IsColumnMajorMatrix<T1>::value &&
187 IsSame<typename T1::ElementType,typename T2::ElementType>::value &&
188 IsSame<typename T1::ElementType,typename T3::ElementType>::value &&
189 IntrinsicTrait<typename T1::ElementType>::addition &&
190 IntrinsicTrait<typename T1::ElementType>::subtraction &&
191 IntrinsicTrait<typename T1::ElementType>::multiplication };
202 template<
typename T1,
typename T2,
typename T3 >
203 struct UseOptimizedKernel {
204 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
205 !IsDiagonal<T2>::value &&
206 !IsResizable<typename T1::ElementType>::value &&
207 !IsResizable<ET2>::value };
217 template<
typename T1,
typename T2,
typename T3 >
218 struct UseDefaultKernel {
219 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
220 !UseOptimizedKernel<T1,T2,T3>::value };
258 enum { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
259 !evaluateRight && MT2::smpAssignable };
292 if(
lhs_.columns() == 0UL )
307 if( element != end ) {
308 tmp =
lhs_(i,element->index()) * element->value();
310 for( ; element!=
end; ++element ) {
311 tmp +=
lhs_(i,element->index()) * element->value();
334 :(
lhs_.columns() ) ) );
337 tmp =
lhs_(i,kbegin) *
rhs_(kbegin,j);
338 for(
size_t k=kbegin+1UL; k<kend; ++k ) {
364 return rhs_.columns();
394 template<
typename T >
396 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
406 template<
typename T >
408 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
418 return lhs_.isAligned();
451 template<
typename MT
461 LT A(
serial( rhs.lhs_ ) );
462 RT B(
serial( rhs.rhs_ ) );
471 TDMatTSMatMultExpr::selectAssignKernel( ~lhs, A, B );
490 template<
typename MT3
497 const size_t ipos( A.rows() &
size_t(-4) );
500 for(
size_t i=0UL; i<ipos; i+=4UL ) {
501 for(
size_t j=0UL; j<B.columns(); ++j )
510 if( element ==
end ) {
512 reset( (~C)(i+1UL,j) );
513 reset( (~C)(i+2UL,j) );
514 reset( (~C)(i+3UL,j) );
518 (~C)(i ,j) = A(i ,element->index()) * element->value();
519 (~C)(i+1UL,j) = A(i+1UL,element->index()) * element->value();
520 (~C)(i+2UL,j) = A(i+2UL,element->index()) * element->value();
521 (~C)(i+3UL,j) = A(i+3UL,element->index()) * element->value();
523 for( ; element!=
end; ++element ) {
524 (~C)(i ,j) += A(i ,element->index()) * element->value();
525 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
526 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
527 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
532 for(
size_t i=ipos; i<A.rows(); ++i ) {
533 for(
size_t j=0UL; j<B.columns(); ++j )
535 ConstIterator element( ( IsUpper<MT4>::value )
536 ?( IsStrictlyUpper<MT4>::value ? B.upperBound(i,j) : B.lowerBound(i,j) )
538 const ConstIterator
end( ( IsLower<MT4>::value )
539 ?( IsStrictlyLower<MT4>::value ? B.lowerBound(i,j) : B.upperBound(i,j) )
542 if( element ==
end ) {
547 (~C)(i,j) = A(i,element->index()) * element->value();
549 for( ; element!=
end; ++element )
550 (~C)(i,j) += A(i,element->index()) * element->value();
571 template<
typename MT3
574 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
575 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
579 for(
size_t j=0UL; j<B.columns(); ++j )
581 for(
size_t i=0UL; i<(~C).
rows(); ++i ) {
585 ConstIterator element( B.begin(j) );
586 const ConstIterator
end( B.end(j) );
588 for( ; element!=
end; ++element )
590 const size_t j1( element->index() );
592 if( IsDiagonal<MT4>::value )
594 (~C)(j1,j) = A(j1,j1) * element->value();
598 const size_t ibegin( ( IsLower<MT4>::value )
599 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
601 const size_t iend( ( IsUpper<MT4>::value )
602 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
606 for(
size_t i=ibegin; i<iend; ++i ) {
608 (~C)(i,j) = A(i,j1) * element->value();
610 (~C)(i,j) += A(i,j1) * element->value();
633 template<
typename MT3
636 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
637 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
643 for(
size_t j=0UL; j<B.columns(); ++j )
645 const ConstIterator
end( B.end(j) );
646 ConstIterator element( B.begin(j) );
648 const size_t nonzeros( B.nonZeros(j) );
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 const size_t ibegin( ( IsLower<MT4>::value )
670 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
672 const size_t iend( ( IsUpper<MT4>::value )
673 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
677 const size_t inum( iend - ibegin );
678 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
681 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
682 (~C)(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
683 (~C)(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
684 (~C)(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
685 (~C)(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
687 for(
size_t i=ipos; i<iend; ++i ) {
688 (~C)(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
692 for( ; element!=
end; ++element )
694 const size_t j1( element->index() );
695 const ET2 v1( element->value() );
697 const size_t ibegin( ( IsLower<MT4>::value )
698 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
700 const size_t iend( ( IsUpper<MT4>::value )
701 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
705 const size_t inum( iend - ibegin );
706 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
709 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
710 (~C)(i ,j) += A(i ,j1) * v1;
711 (~C)(i+1UL,j) += A(i+1UL,j1) * v1;
712 (~C)(i+2UL,j) += A(i+2UL,j1) * v1;
713 (~C)(i+3UL,j) += A(i+3UL,j1) * v1;
715 for(
size_t i=ipos; i<iend; ++i ) {
716 (~C)(i,j) += A(i,j1) * v1;
738 template<
typename MT3
741 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
742 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
744 typedef IntrinsicTrait<ElementType> IT;
749 for(
size_t j=0UL; j<B.columns(); ++j )
751 const ConstIterator
end( B.end(j) );
752 ConstIterator element( B.begin(j) );
754 const size_t nonzeros( B.nonZeros(j) );
755 const size_t kpos( nonzeros &
size_t(-4) );
758 for(
size_t k=0UL; k<kpos; k+=4UL )
760 const size_t j1( element->index() );
761 const IntrinsicType v1(
set( element->value() ) );
763 const size_t j2( element->index() );
764 const IntrinsicType v2(
set( element->value() ) );
766 const size_t j3( element->index() );
767 const IntrinsicType v3(
set( element->value() ) );
769 const size_t j4( element->index() );
770 const IntrinsicType v4(
set( element->value() ) );
775 const size_t ibegin( ( IsLower<MT4>::value )
776 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
778 const size_t iend( ( IsUpper<MT4>::value )
779 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
783 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
784 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
788 for( ; element!=
end; ++element )
790 const size_t j1( element->index() );
791 const IntrinsicType v1(
set( element->value() ) );
793 const size_t ibegin( ( IsLower<MT4>::value )
794 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
796 const size_t iend( ( IsUpper<MT4>::value )
797 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
801 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
802 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 );
823 template<
typename MT
825 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
830 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
842 const TmpType tmp(
serial( rhs ) );
863 template<
typename MT >
864 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
874 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
876 else if( IsSymmetric<MT1>::value )
897 template<
typename MT
899 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
907 LT A(
serial( rhs.lhs_ ) );
908 RT B(
serial( rhs.rhs_ ) );
917 TDMatTSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
936 template<
typename MT3
939 static inline void selectAddAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
943 const size_t ipos( A.rows() & size_t(-4) );
946 for(
size_t i=0UL; i<ipos; i+=4UL ) {
947 for(
size_t j=0UL; j<B.columns(); ++j )
949 ConstIterator element( ( IsUpper<MT4>::value )
950 ?( IsStrictlyUpper<MT4>::value ? B.upperBound(i,j) : B.lowerBound(i,j) )
952 const ConstIterator
end( ( IsLower<MT4>::value )
953 ?( IsStrictlyLower<MT4>::value ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
956 for( ; element!=
end; ++element ) {
957 (~C)(i ,j) += A(i ,element->index()) * element->value();
958 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
959 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
960 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
965 for(
size_t i=ipos; i<A.rows(); ++i ) {
966 for(
size_t j=0UL; j<B.columns(); ++j )
968 ConstIterator element( ( IsUpper<MT4>::value )
969 ?( IsStrictlyUpper<MT4>::value ? B.upperBound(i,j) : B.lowerBound(i,j) )
971 const ConstIterator
end( ( IsLower<MT4>::value )
972 ?( IsStrictlyLower<MT4>::value ? B.lowerBound(i,j) : B.upperBound(i,j) )
975 for( ; element!=
end; ++element )
976 (~C)(i,j) += A(i,element->index()) * element->value();
997 template<
typename MT3
1000 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
1001 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1005 for(
size_t j=0UL; j<B.columns(); ++j )
1007 ConstIterator element( B.begin(j) );
1008 const ConstIterator
end( B.end(j) );
1010 for( ; element!=
end; ++element )
1012 const size_t j1( element->index() );
1014 if( IsDiagonal<MT4>::value )
1016 (~C)(j1,j) += A(j1,j1) * element->value();
1020 const size_t ibegin( ( IsLower<MT4>::value )
1021 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1023 const size_t iend( ( IsUpper<MT4>::value )
1024 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1028 const size_t inum( iend - ibegin );
1029 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1032 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1033 (~C)(i ,j) += A(i ,j1) * element->value();
1034 (~C)(i+1UL,j) += A(i+1UL,j1) * element->value();
1035 (~C)(i+2UL,j) += A(i+2UL,j1) * element->value();
1036 (~C)(i+3UL,j) += A(i+3UL,j1) * element->value();
1038 for(
size_t i=ipos; i<iend; ++i ) {
1039 (~C)(i,j) += A(i,j1) * element->value();
1062 template<
typename MT3
1065 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1066 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1070 for(
size_t j=0UL; j<B.columns(); ++j )
1072 const ConstIterator
end( B.end(j) );
1073 ConstIterator element( B.begin(j) );
1075 const size_t nonzeros( B.nonZeros(j) );
1076 const size_t kpos( nonzeros &
size_t(-4) );
1079 for(
size_t k=0UL; k<kpos; k+=4UL )
1081 const size_t j1( element->index() );
1082 const ET2 v1( element->value() );
1084 const size_t j2( element->index() );
1085 const ET2 v2( element->value() );
1087 const size_t j3( element->index() );
1088 const ET2 v3( element->value() );
1090 const size_t j4( element->index() );
1091 const ET2 v4( element->value() );
1096 const size_t ibegin( ( IsLower<MT4>::value )
1097 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1099 const size_t iend( ( IsUpper<MT4>::value )
1100 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
1104 const size_t inum( iend - ibegin );
1105 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1108 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1109 (~C)(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1110 (~C)(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1111 (~C)(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1112 (~C)(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1114 for(
size_t i=ipos; i<iend; ++i ) {
1115 (~C)(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1119 for( ; element!=
end; ++element )
1121 const size_t j1( element->index() );
1122 const ET2 v1( element->value() );
1124 const size_t ibegin( ( IsLower<MT4>::value )
1125 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1127 const size_t iend( ( IsUpper<MT4>::value )
1128 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1132 const size_t inum( iend - ibegin );
1133 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1136 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1137 (~C)(i ,j) += A(i ,j1) * v1;
1138 (~C)(i+1UL,j) += A(i+1UL,j1) * v1;
1139 (~C)(i+2UL,j) += A(i+2UL,j1) * v1;
1140 (~C)(i+3UL,j) += A(i+3UL,j1) * v1;
1142 for(
size_t i=ipos; i<iend; ++i ) {
1143 (~C)(i,j) += A(i,j1) * v1;
1165 template<
typename MT3
1168 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
1169 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1171 typedef IntrinsicTrait<ElementType> IT;
1174 for(
size_t j=0UL; j<B.columns(); ++j )
1176 const ConstIterator
end( B.end(j) );
1177 ConstIterator element( B.begin(j) );
1179 const size_t nonzeros( B.nonZeros(j) );
1180 const size_t kpos( nonzeros &
size_t(-4) );
1183 for(
size_t k=0UL; k<kpos; k+=4UL )
1185 const size_t j1( element->index() );
1186 const IntrinsicType v1(
set( element->value() ) );
1188 const size_t j2( element->index() );
1189 const IntrinsicType v2(
set( element->value() ) );
1191 const size_t j3( element->index() );
1192 const IntrinsicType v3(
set( element->value() ) );
1194 const size_t j4( element->index() );
1195 const IntrinsicType v4(
set( element->value() ) );
1200 const size_t ibegin( ( IsLower<MT4>::value )
1201 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1203 const size_t iend( ( IsUpper<MT4>::value )
1204 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
1208 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1209 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
1213 for( ; element!=
end; ++element )
1215 const size_t j1( element->index() );
1216 const IntrinsicType v1(
set( element->value() ) );
1218 const size_t ibegin( ( IsLower<MT4>::value )
1219 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1221 const size_t iend( ( IsUpper<MT4>::value )
1222 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1226 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1227 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 );
1250 template<
typename MT >
1251 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1261 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1263 else if( IsSymmetric<MT1>::value )
1288 template<
typename MT
1297 LT A(
serial( rhs.lhs_ ) );
1298 RT B(
serial( rhs.rhs_ ) );
1307 TDMatTSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1326 template<
typename MT3
1329 static inline void selectSubAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
1333 const size_t ipos( A.rows() & size_t(-4) );
1336 for(
size_t i=0UL; i<ipos; i+=4UL ) {
1337 for(
size_t j=0UL; j<B.columns(); ++j )
1339 ConstIterator element( ( IsUpper<MT4>::value )
1340 ?( IsStrictlyUpper<MT4>::value ? B.upperBound(i,j) : B.lowerBound(i,j) )
1342 const ConstIterator
end( ( IsLower<MT4>::value )
1343 ?( IsStrictlyLower<MT4>::value ? B.lowerBound(i+4UL,j) : B.upperBound(i+4UL,j) )
1346 for( ; element!=
end; ++element ) {
1347 (~C)(i ,j) -= A(i ,element->index()) * element->value();
1348 (~C)(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1349 (~C)(i+2UL,j) -= A(i+2UL,element->index()) * element->value();
1350 (~C)(i+3UL,j) -= A(i+3UL,element->index()) * element->value();
1355 for(
size_t i=ipos; i<A.rows(); ++i ) {
1356 for(
size_t j=0UL; j<B.columns(); ++j )
1358 ConstIterator element( ( IsUpper<MT4>::value )
1359 ?( IsStrictlyUpper<MT4>::value ? B.upperBound(i,j) : B.lowerBound(i,j) )
1361 const ConstIterator
end( ( IsLower<MT4>::value )
1362 ?( IsStrictlyLower<MT4>::value ? B.lowerBound(i,j) : B.upperBound(i,j) )
1365 for( ; element!=
end; ++element )
1366 (~C)(i,j) -= A(i,element->index()) * element->value();
1387 template<
typename MT3
1390 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
1391 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1395 for(
size_t j=0UL; j<B.columns(); ++j )
1397 ConstIterator element( B.begin(j) );
1398 const ConstIterator
end( B.end(j) );
1400 for( ; element!=
end; ++element )
1402 const size_t j1( element->index() );
1404 if( IsDiagonal<MT4>::value )
1406 (~C)(j1,j) -= A(j1,j1) * element->value();
1410 const size_t ibegin( ( IsLower<MT4>::value )
1411 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1413 const size_t iend( ( IsUpper<MT4>::value )
1414 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1418 const size_t inum( iend - ibegin );
1419 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1422 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1423 (~C)(i ,j) -= A(i ,j1) * element->value();
1424 (~C)(i+1UL,j) -= A(i+1UL,j1) * element->value();
1425 (~C)(i+2UL,j) -= A(i+2UL,j1) * element->value();
1426 (~C)(i+3UL,j) -= A(i+3UL,j1) * element->value();
1428 for(
size_t i=ipos; i<iend; ++i ) {
1429 (~C)(i,j) -= A(i,j1) * element->value();
1452 template<
typename MT3
1455 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1456 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1460 for(
size_t j=0UL; j<B.columns(); ++j )
1462 const ConstIterator
end( B.end(j) );
1463 ConstIterator element( B.begin(j) );
1465 const size_t nonzeros( B.nonZeros(j) );
1466 const size_t kpos( nonzeros &
size_t(-4) );
1469 for(
size_t k=0UL; k<kpos; k+=4UL )
1471 const size_t j1( element->index() );
1472 const ET2 v1( element->value() );
1474 const size_t j2( element->index() );
1475 const ET2 v2( element->value() );
1477 const size_t j3( element->index() );
1478 const ET2 v3( element->value() );
1480 const size_t j4( element->index() );
1481 const ET2 v4( element->value() );
1486 const size_t ibegin( ( IsLower<MT4>::value )
1487 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1489 const size_t iend( ( IsUpper<MT4>::value )
1490 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
1494 const size_t inum( iend - ibegin );
1495 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1498 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1499 (~C)(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1500 (~C)(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1501 (~C)(i+2UL,j) -= A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1502 (~C)(i+3UL,j) -= A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1504 for(
size_t i=ipos; i<iend; ++i ) {
1505 (~C)(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1509 for( ; element!=
end; ++element )
1511 const size_t j1( element->index() );
1512 const ET2 v1( element->value() );
1514 const size_t ibegin( ( IsLower<MT4>::value )
1515 ?( IsStrictlyLower<MT4>::value ? j1+1UL : j1 )
1517 const size_t iend( ( IsUpper<MT4>::value )
1518 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1522 const size_t inum( iend - ibegin );
1523 const size_t ipos( ibegin + ( inum &
size_t(-4) ) );
1526 for(
size_t i=ibegin; i<ipos; i+=4UL ) {
1527 (~C)(i ,j) -= A(i ,j1) * v1;
1528 (~C)(i+1UL,j) -= A(i+1UL,j1) * v1;
1529 (~C)(i+2UL,j) -= A(i+2UL,j1) * v1;
1530 (~C)(i+3UL,j) -= A(i+3UL,j1) * v1;
1532 for(
size_t i=ipos; i<iend; ++i ) {
1533 (~C)(i,j) -= A(i,j1) * v1;
1555 template<
typename MT3
1558 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
1559 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1561 typedef IntrinsicTrait<ElementType> IT;
1564 for(
size_t j=0UL; j<B.columns(); ++j )
1566 const ConstIterator
end( B.end(j) );
1567 ConstIterator element( B.begin(j) );
1569 const size_t nonzeros( B.nonZeros(j) );
1570 const size_t kpos( nonzeros &
size_t(-4) );
1573 for(
size_t k=0UL; k<kpos; k+=4UL )
1575 const size_t j1( element->index() );
1576 const IntrinsicType v1(
set( element->value() ) );
1578 const size_t j2( element->index() );
1579 const IntrinsicType v2(
set( element->value() ) );
1581 const size_t j3( element->index() );
1582 const IntrinsicType v3(
set( element->value() ) );
1584 const size_t j4( element->index() );
1585 const IntrinsicType v4(
set( element->value() ) );
1590 const size_t ibegin( ( IsLower<MT4>::value )
1591 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1593 const size_t iend( ( IsUpper<MT4>::value )
1594 ?( IsStrictlyUpper<MT4>::value ? j4 : j4+1UL )
1598 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1599 (~C).
store( i, j, (~C).load(i,j) - A.load(i,j1) * v1 - A.load(i,j2) * v2 - A.load(i,j3) * v3 - A.load(i,j4) * v4 );
1603 for( ; element!=
end; ++element )
1605 const size_t j1( element->index() );
1606 const IntrinsicType v1(
set( element->value() ) );
1608 const size_t ibegin( ( IsLower<MT4>::value )
1609 ?( ( IsStrictlyLower<MT4>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1611 const size_t iend( ( IsUpper<MT4>::value )
1612 ?( IsStrictlyUpper<MT4>::value ? j1 : j1+1UL )
1616 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1617 (~C).
store( i, j, (~C).load(i,j) - A.load(i,j1) * v1 );
1641 template<
typename MT >
1642 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1652 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1654 else if( IsSymmetric<MT1>::value )
1690 template<
typename MT
1692 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1731 template<
typename MT
1733 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1738 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
1750 const TmpType tmp( rhs );
1771 template<
typename MT >
1772 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1782 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1784 else if( IsSymmetric<MT1>::value )
1808 template<
typename MT
1810 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1849 template<
typename MT >
1850 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1860 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1862 else if( IsSymmetric<MT1>::value )
1890 template<
typename MT
1892 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1931 template<
typename MT >
1932 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1942 if( IsSymmetric<MT1>::value && IsSymmetric<MT2>::value )
1944 else if( IsSymmetric<MT1>::value )
2014 template<
typename T1
2016 inline const TDMatTSMatMultExpr<T1,T2>
2022 throw std::invalid_argument(
"Matrix sizes do not match" );
2039 template<
typename MT1,
typename MT2 >
2057 template<
typename MT1,
typename MT2 >
2059 :
public Columns<MT2>
2075 template<
typename MT1,
typename MT2 >
2077 :
public IsTrue< And< IsLower<MT1>, IsLower<MT2> >::value >
2093 template<
typename MT1,
typename MT2 >
2095 :
public IsTrue< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
2111 template<
typename MT1,
typename MT2 >
2113 :
public IsTrue< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2114 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
2130 template<
typename MT1,
typename MT2 >
2132 :
public IsTrue< And< IsUpper<MT1>, IsUpper<MT2> >::value >
2148 template<
typename MT1,
typename MT2 >
2150 :
public IsTrue< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
2166 template<
typename MT1,
typename MT2 >
2168 :
public IsTrue< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2169 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
2185 template<
typename MT1,
typename MT2,
typename VT >
2190 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2191 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2192 IsDenseVector<VT>::value && IsColumnVector<VT>::value
2193 ,
typename TDMatDVecMultExprTrait< MT1, typename TSMatDVecMultExprTrait<MT2,VT>::Type >::Type
2194 , INVALID_TYPE >::Type Type;
2203 template<
typename MT1,
typename MT2,
typename VT >
2208 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2209 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2210 IsSparseVector<VT>::value && IsColumnVector<VT>::value
2211 ,
typename TDMatDVecMultExprTrait< MT1, typename TSMatDVecMultExprTrait<MT2,VT>::Type >::Type
2212 , INVALID_TYPE >::Type Type;
2221 template<
typename VT,
typename MT1,
typename MT2 >
2226 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2227 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2228 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
2229 ,
typename TDVecTSMatMultExprTrait< typename TDVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
2230 , INVALID_TYPE >::Type Type;
2239 template<
typename VT,
typename MT1,
typename MT2 >
2244 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2245 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2246 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
2247 ,
typename TDVecTSMatMultExprTrait< typename TSVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
2248 , INVALID_TYPE >::Type Type;
2257 template<
typename MT1,
typename MT2,
bool AF >
2262 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
2263 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
2272 template<
typename MT1,
typename MT2 >
2277 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
2286 template<
typename MT1,
typename MT2 >
2291 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1649
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
TDMatTSMatMultExpr< MT1, MT2 > This
Type of this TDMatTSMatMultExpr instance.
Definition: TDMatTSMatMultExpr.h:227
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
const DMatDMatMultExpr< T1, T2 > 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:8247
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:105
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
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:258
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:132
Expression object for transpose dense matrix-transpose sparse matrix multiplications.The TDMatTSMatMultExpr class represents the compile time expression for multiplications between a column-major dense matrix and a column-major sparse matrix.
Definition: Forward.h:132
Header file for the IsSparseMatrix type trait.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:209
Header file for the IsDiagonal type trait.
#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:79
Header file for the ColumnExprTrait class template.
Header file for the IsColumnMajorMatrix type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
MT2::CompositeType CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:134
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:228
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:261
Header file for the And class template.
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:240
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:233
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
Header file for the RequiresEvaluation type trait.
Header file for the IsUniLower type trait.
SelectType< evaluateRight, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:246
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Constraint on the data type.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: TDMatTSMatMultExpr.h:363
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatTSMatMultExpr.h:234
Constraint on the data type.
Constraint on the data type.
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
SelectType< evaluateLeft, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatTSMatMultExpr.h:243
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: TDMatTSMatMultExpr.h:232
const size_t SMP_TDMATTSMATMULT_THRESHOLD
SMP column-major dense matrix/column-major sparse matrix multiplication threshold.This threshold specifies when a column-major dense matrix/column-major sparse matrix multiplication can be executed in parallel. In case the number of rows/columns of the target matrix is larger or equal to this threshold, the operation is executed in parallel. If the number of rows/columns is below this threshold the operation is executed single-threaded.
Definition: Thresholds.h:995
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the DisableIf class template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:230
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#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: StorageOrder.h:161
Header file for the TSVecTDMatMultExprTrait class template.
TDMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the TDMatTSMatMultExpr class.
Definition: TDMatTSMatMultExpr.h:268
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
Header file for the Or class template.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type store(T *address, const sse_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Store.h:80
Header file for the TDMatSVecMultExprTrait class template.
Header file for the TDVecTSMatMultExprTrait class template.
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1602
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
Header file for the Columns type trait.
Header file for the TSMatDVecMultExprTrait class template.
Header file for the IsLower type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:92
#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:78
Header file for the IsTriangular type trait.
Constraints on the storage order of matrix types.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TDMatTSMatMultExpr.h:395
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:434
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the serial shim.
#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:165
LeftOperand leftOperand() const
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatTSMatMultExpr.h:373
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:229
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDMatTSMatMultExpr.h:407
EnableIf< IsDenseMatrix< MT1 > >::Type 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 IsSparseVector type trait.
#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:116
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: StorageOrder.h:81
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
size_t rows() const
Returns the current number of rows of the matrix.
Definition: TDMatTSMatMultExpr.h:353
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Utility type for generic codes.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TDMatTSMatMultExpr.h:427
Base template for the MultTrait class.
Definition: MultTrait.h:150
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatTSMatMultExpr.h:417
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
Header file for the reset shim.
MT1::ResultType RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:129
Header file for the isDefault shim.
MT1::CompositeType CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:133
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:131
Header file for the RemoveReference type trait.
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
#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:283
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
ResultType::ElementType ElementType
Resulting element type.
Definition: TDMatTSMatMultExpr.h:231
Header file for the IsRowMajorMatrix type trait.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:937
Header file for the IsComputation type trait class.
MT2::ResultType RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:130
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Header file for the TDMatDVecMultExprTrait class template.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TDMatTSMatMultExpr.h:283
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
Header file for the IsTrue value trait.
RightOperand rightOperand() const
Returns the right-hand side transpose sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:383
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
Constraint on the data type.
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:435
Header file for the IsResizable type trait.
Size type of the Blaze library.
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 TDVecTDMatMultExprTrait class template.
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:237
#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:79
Header file for the IsExpression type trait class.
Header file for the TSMatSVecMultExprTrait class template.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849