35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
111 template<
typename MT1
113 class TDMatSMatMultExpr :
public DenseMatrix< TDMatSMatMultExpr<MT1,MT2>, true >
114 ,
private MatMatMultExpr
115 ,
private Computation
146 template<
typename T1,
typename T2,
typename T3 >
147 struct CanExploitSymmetry {
148 enum { value = ( IsRowMajorMatrix<T1>::value && IsSymmetric<T2>::value ) ||
149 ( IsColumnMajorMatrix<T1>::value && IsSymmetric<T3>::value ) };
160 template<
typename T1,
typename T2,
typename T3 >
161 struct IsEvaluationRequired {
162 enum { value = ( evaluateLeft || evaluateRight ) &&
163 !CanExploitSymmetry<T1,T2,T3>::value };
174 template<
typename T1,
typename T2,
typename T3 >
175 struct UseOptimizedKernel {
176 enum { value = !IsResizable<typename T1::ElementType>::value };
186 template<
typename T1,
typename T2,
typename T3 >
187 struct UseDefaultKernel {
188 enum { value = !UseOptimizedKernel<T1,T2,T3>::value };
218 enum { vectorizable = 0 };
221 enum { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
222 !evaluateRight && MT2::smpAssignable };
252 if(
lhs_.columns() != 0 ) {
254 for(
size_t k=1; k<
lhs_.columns(); ++k ) {
282 return rhs_.columns();
312 template<
typename T >
314 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
324 template<
typename T >
326 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
336 return lhs_.isAligned();
369 template<
typename MT >
390 TDMatSMatMultExpr::selectRowMajorAssignKernel( ~lhs, A, B );
410 template<
typename MT3
414 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
418 for(
size_t i=0; i<A.rows(); ++i ) {
419 for(
size_t j=0; j<C.columns(); ++j ) {
422 for(
size_t j=0; j<B.rows(); ++j ) {
423 ConstIterator element( B.begin(j) );
424 const ConstIterator
end( B.end(j) );
425 for( ; element!=
end; ++element ) {
427 C(i,element->index()) = A(i,j) * element->value();
429 C(i,element->index()) += A(i,j) * element->value();
452 template<
typename MT3
455 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
456 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
460 const size_t last( A.rows() & size_t(-4) );
462 for(
size_t i=0; i<last; i+=4 ) {
463 for(
size_t j=0; j<C.columns(); ++j ) {
469 for(
size_t j=0; j<B.rows(); ++j ) {
470 ConstIterator element( B.begin(j) );
471 const ConstIterator
end( B.end(j) );
472 for( ; element!=
end; ++element ) {
473 C(i ,element->index()) += A(i ,j) * element->value();
474 C(i+1,element->index()) += A(i+1,j) * element->value();
475 C(i+2,element->index()) += A(i+2,j) * element->value();
476 C(i+3,element->index()) += A(i+3,j) * element->value();
481 for(
size_t i=last; i<A.rows(); ++i ) {
482 for(
size_t j=0; j<C.columns(); ++j ) {
485 for(
size_t j=0; j<B.rows(); ++j ) {
486 ConstIterator element( B.begin(j) );
487 const ConstIterator
end( B.end(j) );
488 for( ; element!=
end; ++element ) {
489 C(i,element->index()) += A(i,j) * element->value();
510 template<
typename MT >
511 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
529 TDMatSMatMultExpr::selectColumnMajorAssignKernel( ~lhs, A, B );
549 template<
typename MT3
552 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
553 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
559 for(
size_t i=0; i<B.rows(); ++i ) {
560 ConstIterator element( B.begin(i) );
561 const ConstIterator
end( B.end(i) );
562 for( ; element!=
end; ++element ) {
563 for(
size_t j=0; j<A.rows(); ++j ) {
565 C(j,element->index()) = A(j,i) * element->value();
567 C(j,element->index()) += A(j,i) * element->value();
590 template<
typename MT3
593 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
594 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
600 BLAZE_INTERNAL_ASSERT( ( A.rows() - ( A.rows() % 4UL ) ) == ( A.rows() & size_t(-4) ),
"Invalid end calculation" );
601 const size_t jend( A.rows() & size_t(-4) );
604 for(
size_t i=0UL; i<B.rows(); ++i ) {
605 ConstIterator element( B.begin(i) );
606 const ConstIterator
end( B.end(i) );
608 const size_t nonzeros( B.nonZeros(i) );
609 const size_t kend( nonzeros &
size_t(-4) );
611 for(
size_t k=0UL; k<kend; k+=4UL )
613 const size_t i1( element->index() );
614 const ET2 v1( element->value() );
616 const size_t i2( element->index() );
617 const ET2 v2( element->value() );
619 const size_t i3( element->index() );
620 const ET2 v3( element->value() );
622 const size_t i4( element->index() );
623 const ET2 v4( element->value() );
626 for( j=0UL; j<jend; j+=4UL ) {
627 C(j ,i1) += A(j ,i) * v1;
628 C(j+1UL,i1) += A(j+1UL,i) * v1;
629 C(j+2UL,i1) += A(j+2UL,i) * v1;
630 C(j+3UL,i1) += A(j+3UL,i) * v1;
631 C(j ,i2) += A(j ,i) * v2;
632 C(j+1UL,i2) += A(j+1UL,i) * v2;
633 C(j+2UL,i2) += A(j+2UL,i) * v2;
634 C(j+3UL,i2) += A(j+3UL,i) * v2;
635 C(j ,i3) += A(j ,i) * v3;
636 C(j+1UL,i3) += A(j+1UL,i) * v3;
637 C(j+2UL,i3) += A(j+2UL,i) * v3;
638 C(j+3UL,i3) += A(j+3UL,i) * v3;
639 C(j ,i4) += A(j ,i) * v4;
640 C(j+1UL,i4) += A(j+1UL,i) * v4;
641 C(j+2UL,i4) += A(j+2UL,i) * v4;
642 C(j+3UL,i4) += A(j+3UL,i) * v4;
644 for( ; j<A.rows(); ++j ) {
645 C(j,i1) += A(j,i) * v1;
646 C(j,i2) += A(j,i) * v2;
647 C(j,i3) += A(j,i) * v3;
648 C(j,i4) += A(j,i) * v4;
652 for( ; element!=
end; ++element ) {
653 for( j=0UL; j<jend; j+=4UL ) {
654 C(j ,element->index()) += A(j ,i) * element->value();
655 C(j+1UL,element->index()) += A(j+1UL,i) * element->value();
656 C(j+2UL,element->index()) += A(j+2UL,i) * element->value();
657 C(j+3UL,element->index()) += A(j+3UL,i) * element->value();
659 for( ; j<A.rows(); ++j ) {
660 C(j,element->index()) += A(j,i) * element->value();
681 template<
typename MT
683 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
688 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
700 const TmpType tmp(
serial( rhs ) );
721 template<
typename MT >
722 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
752 template<
typename MT >
753 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
779 template<
typename MT >
780 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
800 TDMatSMatMultExpr::selectRowMajorAddAssignKernel( ~lhs, A, B );
819 template<
typename MT3
822 static inline void selectRowMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
826 const size_t last( A.rows() & size_t(-4) );
829 for(
size_t i=0UL; i<last; i+=4UL ) {
830 for(
size_t j=0UL; j<B.rows(); ++j ) {
831 ConstIterator element( B.begin(j) );
832 const ConstIterator
end( B.end(j) );
833 for( ; element!=
end; ++element ) {
834 C(i ,element->index()) += A(i ,j) * element->value();
835 C(i+1UL,element->index()) += A(i+1UL,j) * element->value();
836 C(i+2UL,element->index()) += A(i+2UL,j) * element->value();
837 C(i+3UL,element->index()) += A(i+3UL,j) * element->value();
842 for(
size_t i=last; i<A.rows(); ++i ) {
843 for(
size_t j=0UL; j<B.rows(); ++j ) {
844 ConstIterator element( B.begin(j) );
845 const ConstIterator
end( B.end(j) );
846 for( ; element!=
end; ++element ) {
847 C(i,element->index()) += A(i,j) * element->value();
868 template<
typename MT >
869 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
887 TDMatSMatMultExpr::selectColumnMajorAddAssignKernel( ~lhs, A, B );
906 template<
typename MT3
909 static inline void selectColumnMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
913 const size_t jend( A.rows() & size_t(-4) );
917 for(
size_t i=0UL; i<B.rows(); ++i ) {
918 ConstIterator element( B.begin(i) );
919 const ConstIterator
end( B.end(i) );
921 const size_t nonzeros( B.nonZeros(i) );
922 const size_t kend( nonzeros &
size_t(-4) );
924 for(
size_t k=0UL; k<kend; k+=4UL )
926 const size_t i1( element->index() );
927 const ET2 v1( element->value() );
929 const size_t i2( element->index() );
930 const ET2 v2( element->value() );
932 const size_t i3( element->index() );
933 const ET2 v3( element->value() );
935 const size_t i4( element->index() );
936 const ET2 v4( element->value() );
939 for( j=0UL; j<jend; j+=4UL ) {
940 C(j ,i1) += A(j ,i) * v1;
941 C(j+1UL,i1) += A(j+1UL,i) * v1;
942 C(j+2UL,i1) += A(j+2UL,i) * v1;
943 C(j+3UL,i1) += A(j+3UL,i) * v1;
944 C(j ,i2) += A(j ,i) * v2;
945 C(j+1UL,i2) += A(j+1UL,i) * v2;
946 C(j+2UL,i2) += A(j+2UL,i) * v2;
947 C(j+3UL,i2) += A(j+3UL,i) * v2;
948 C(j ,i3) += A(j ,i) * v3;
949 C(j+1UL,i3) += A(j+1UL,i) * v3;
950 C(j+2UL,i3) += A(j+2UL,i) * v3;
951 C(j+3UL,i3) += A(j+3UL,i) * v3;
952 C(j ,i4) += A(j ,i) * v4;
953 C(j+1UL,i4) += A(j+1UL,i) * v4;
954 C(j+2UL,i4) += A(j+2UL,i) * v4;
955 C(j+3UL,i4) += A(j+3UL,i) * v4;
957 for( ; j<A.rows(); ++j ) {
958 C(j,i1) += A(j,i) * v1;
959 C(j,i2) += A(j,i) * v2;
960 C(j,i3) += A(j,i) * v3;
961 C(j,i4) += A(j,i) * v4;
965 for( ; element!=
end; ++element ) {
966 for( j=0UL; j<jend; j+=4UL ) {
967 C(j ,element->index()) += A(j ,i) * element->value();
968 C(j+1UL,element->index()) += A(j+1UL,i) * element->value();
969 C(j+2UL,element->index()) += A(j+2UL,i) * element->value();
970 C(j+3UL,element->index()) += A(j+3UL,i) * element->value();
972 for( ; j<A.rows(); ++j ) {
973 C(j,element->index()) += A(j,i) * element->value();
997 template<
typename MT >
998 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1028 template<
typename MT >
1029 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1059 template<
typename MT >
1060 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1080 TDMatSMatMultExpr::selectRowMajorSubAssignKernel( ~lhs, A, B );
1099 template<
typename MT3
1102 static inline void selectRowMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1106 const size_t last( A.rows() & size_t(-4) );
1109 for(
size_t i=0UL; i<last; i+=4UL ) {
1110 for(
size_t j=0UL; j<B.rows(); ++j ) {
1111 ConstIterator element( B.begin(j) );
1112 const ConstIterator
end( B.end(j) );
1113 for( ; element!=
end; ++element ) {
1114 C(i ,element->index()) -= A(i ,j) * element->value();
1115 C(i+1UL,element->index()) -= A(i+1UL,j) * element->value();
1116 C(i+2UL,element->index()) -= A(i+2UL,j) * element->value();
1117 C(i+3UL,element->index()) -= A(i+3UL,j) * element->value();
1122 for(
size_t i=last; i<A.rows(); ++i ) {
1123 for(
size_t j=0UL; j<B.rows(); ++j ) {
1124 ConstIterator element( B.begin(j) );
1125 const ConstIterator
end( B.end(j) );
1126 for( ; element!=
end; ++element ) {
1127 C(i,element->index()) -= A(i,j) * element->value();
1148 template<
typename MT >
1149 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1167 TDMatSMatMultExpr::selectColumnMajorSubAssignKernel( ~lhs, A, B );
1186 template<
typename MT3
1189 static inline void selectColumnMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1193 const size_t jend( A.rows() & size_t(-4) );
1197 for(
size_t i=0UL; i<B.rows(); ++i ) {
1198 ConstIterator element( B.begin(i) );
1199 const ConstIterator
end( B.end(i) );
1201 const size_t nonzeros( B.nonZeros(i) );
1202 const size_t kend( nonzeros &
size_t(-4) );
1204 for(
size_t k=0UL; k<kend; k+=4UL )
1206 const size_t i1( element->index() );
1207 const ET2 v1( element->value() );
1209 const size_t i2( element->index() );
1210 const ET2 v2( element->value() );
1212 const size_t i3( element->index() );
1213 const ET2 v3( element->value() );
1215 const size_t i4( element->index() );
1216 const ET2 v4( element->value() );
1219 for( j=0UL; j<jend; j+=4UL ) {
1220 C(j ,i1) -= A(j ,i) * v1;
1221 C(j+1UL,i1) -= A(j+1UL,i) * v1;
1222 C(j+2UL,i1) -= A(j+2UL,i) * v1;
1223 C(j+3UL,i1) -= A(j+3UL,i) * v1;
1224 C(j ,i2) -= A(j ,i) * v2;
1225 C(j+1UL,i2) -= A(j+1UL,i) * v2;
1226 C(j+2UL,i2) -= A(j+2UL,i) * v2;
1227 C(j+3UL,i2) -= A(j+3UL,i) * v2;
1228 C(j ,i3) -= A(j ,i) * v3;
1229 C(j+1UL,i3) -= A(j+1UL,i) * v3;
1230 C(j+2UL,i3) -= A(j+2UL,i) * v3;
1231 C(j+3UL,i3) -= A(j+3UL,i) * v3;
1232 C(j ,i4) -= A(j ,i) * v4;
1233 C(j+1UL,i4) -= A(j+1UL,i) * v4;
1234 C(j+2UL,i4) -= A(j+2UL,i) * v4;
1235 C(j+3UL,i4) -= A(j+3UL,i) * v4;
1237 for( ; j<A.rows(); ++j ) {
1238 C(j,i1) -= A(j,i) * v1;
1239 C(j,i2) -= A(j,i) * v2;
1240 C(j,i3) -= A(j,i) * v3;
1241 C(j,i4) -= A(j,i) * v4;
1245 for( ; element!=
end; ++element ) {
1246 for( j=0UL; j<jend; j+=4UL ) {
1247 C(j ,element->index()) -= A(j ,i) * element->value();
1248 C(j+1UL,element->index()) -= A(j+1UL,i) * element->value();
1249 C(j+2UL,element->index()) -= A(j+2UL,i) * element->value();
1250 C(j+3UL,element->index()) -= A(j+3UL,i) * element->value();
1252 for( ; j<A.rows(); ++j ) {
1253 C(j,element->index()) -= A(j,i) * element->value();
1277 template<
typename MT >
1278 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1306 template<
typename MT >
1307 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1350 template<
typename MT
1352 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1391 template<
typename MT
1393 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1398 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
1410 const TmpType tmp( rhs );
1431 template<
typename MT >
1432 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1462 template<
typename MT >
1463 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1492 template<
typename MT
1494 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1532 template<
typename MT >
1533 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1561 template<
typename MT >
1562 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1597 template<
typename MT
1599 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1637 template<
typename MT >
1638 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1668 template<
typename MT >
1669 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1745 template<
typename T1
1747 inline const TDMatSMatMultExpr<T1,T2>
1753 throw std::invalid_argument(
"Matrix sizes do not match" );
1770 template<
typename MT1,
typename MT2 >
1788 template<
typename MT1,
typename MT2 >
1790 :
public Columns<MT2>
1806 template<
typename MT1,
typename MT2 >
1808 :
public IsTrue< IsLower<MT1>::value && IsLower<MT2>::value >
1824 template<
typename MT1,
typename MT2 >
1826 :
public IsTrue< IsUpper<MT1>::value && IsUpper<MT2>::value >
1842 template<
typename MT1,
typename MT2,
typename VT >
1847 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1848 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1849 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1850 ,
typename TDMatDVecMultExprTrait< MT1, typename SMatDVecMultExprTrait<MT2,VT>::Type >::Type
1851 , INVALID_TYPE >::Type Type;
1860 template<
typename MT1,
typename MT2,
typename VT >
1865 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1866 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1867 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1868 ,
typename TDMatSVecMultExprTrait< MT1, typename SMatSVecMultExprTrait<MT2,VT>::Type >::Type
1869 , INVALID_TYPE >::Type Type;
1878 template<
typename VT,
typename MT1,
typename MT2 >
1883 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1884 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1885 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1886 ,
typename TDMatDVecMultExprTrait< MT1, typename SMatDVecMultExprTrait<MT2,VT>::Type >::Type
1887 , INVALID_TYPE >::Type Type;
1896 template<
typename VT,
typename MT1,
typename MT2 >
1901 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1902 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1903 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1904 ,
typename TDVecSMatMultExprTrait< typename TSVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1905 , INVALID_TYPE >::Type Type;
1914 template<
typename MT1,
typename MT2,
bool AF >
1919 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
1920 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
1929 template<
typename MT1,
typename MT2 >
1934 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1943 template<
typename MT1,
typename MT2 >
1948 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSMatMultExpr.h:335
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
size_t columns() const
Returns the current number of columns of the matrix.
Definition: TDMatSMatMultExpr.h:281
Header file for the SMatDVecMultExprTrait class template.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:198
Header file for the Rows 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:4838
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
Header file for the IsSparseMatrix type trait.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:205
#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.
TDMatSMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the TDMatSMatMultExpr class.
Definition: TDMatSMatMultExpr.h:231
Header file for the IsColumnMajorMatrix type trait.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2478
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:257
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:200
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:695
Header file for the Computation base class.
SelectType< evaluateLeft, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSMatMultExpr.h:210
Header file for the MatMatMultExpr base class.
Expression object for transpose dense matrix-sparse matrix multiplications.The TDMatSMatMultExpr clas...
Definition: Forward.h:128
size_t rows() const
Returns the current number of rows of the matrix.
Definition: TDMatSMatMultExpr.h:271
TDMatSMatMultExpr< MT1, MT2 > This
Type of this TDMatSMatMultExpr instance.
Definition: TDMatSMatMultExpr.h:195
ResultType::ElementType ElementType
Resulting element type.
Definition: TDMatSMatMultExpr.h:199
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
Constraint on the data type.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TDMatSMatMultExpr.h:313
Constraint on the data type.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSMatMultExpr.h:325
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
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 IsSymmetric type trait.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:196
#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.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:353
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:207
Header file for the TDMatSVecMultExprTrait class template.
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 IsLower type trait.
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:122
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:204
Header file for the SMatSVecMultExprTrait class template.
#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
LeftOperand leftOperand() const
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSMatMultExpr.h:291
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
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.
Header file for the EnableIf class template.
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
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatSMatMultExpr.h:197
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
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.
Base template for the MultTrait class.
Definition: MultTrait.h:142
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
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
const size_t SMP_TDMATSMATMULT_THRESHOLD
SMP column-major dense matrix/row-major sparse matrix multiplication threshold.This threshold specifi...
Definition: Thresholds.h:972
Header file for the reset shim.
Header file for the isDefault shim.
BLAZE_ALWAYS_INLINE bool isDefault(const NonNumericProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: NonNumericProxy.h:874
Constraint on the data type.
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
#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.
SelectType< evaluateRight, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TDMatSMatMultExpr.h:213
MT2::ResultType RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:120
MT1::CompositeType CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:123
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:352
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:932
Header file for the IsComputation type trait class.
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
MT2::CompositeType CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:124
Header file for the TDMatDVecMultExprTrait class template.
#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:2473
Header file for the IsTrue value trait.
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:121
Header file for basic type definitions.
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
Constraint on the data type.
Header file for the IsResizable type trait.
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.
#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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TDMatSMatMultExpr.h:246
MT1::ResultType RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:119
RightOperand rightOperand() const
Returns the right-hand side sparse matrix operand.
Definition: TDMatSMatMultExpr.h:301
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSMatMultExpr.h:201
Header file for the IsExpression type trait class.
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
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSMatMultExpr.h:345