35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
102 template<
typename MT1
104 class TDMatSMatMultExpr :
public DenseMatrix< TDMatSMatMultExpr<MT1,MT2>, true >
105 ,
private MatMatMultExpr
106 ,
private Computation
134 template<
typename MT >
135 struct UseSMPAssign {
136 enum { value = ( evaluateLeft || evaluateRight ) };
147 template<
typename T1,
typename T2,
typename T3 >
148 struct UseOptimizedKernel {
149 enum { value = !IsResizable<typename T1::ElementType>::value };
159 template<
typename T1,
typename T2,
typename T3 >
160 struct UseDefaultKernel {
161 enum { value = !UseOptimizedKernel<T1,T2,T3>::value };
191 enum { vectorizable = 0 };
194 enum { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
195 !evaluateRight && MT2::smpAssignable };
225 if(
lhs_.columns() != 0 ) {
227 for(
size_t k=1; k<
lhs_.columns(); ++k ) {
255 return rhs_.columns();
285 template<
typename T >
287 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
297 template<
typename T >
299 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
309 return lhs_.isAligned();
342 template<
typename MT >
360 TDMatSMatMultExpr::selectRowMajorAssignKernel( ~lhs, A, B );
380 template<
typename MT3
384 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
388 for(
size_t i=0; i<A.rows(); ++i ) {
389 for(
size_t j=0; j<C.columns(); ++j ) {
392 for(
size_t j=0; j<B.rows(); ++j ) {
393 ConstIterator element( B.begin(j) );
394 const ConstIterator end( B.end(j) );
395 for( ; element!=end; ++element ) {
397 C(i,element->index()) = A(i,j) * element->value();
399 C(i,element->index()) += A(i,j) * element->value();
422 template<
typename MT3
425 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
426 selectRowMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
430 const size_t last( A.rows() & size_t(-4) );
432 for(
size_t i=0; i<last; i+=4 ) {
433 for(
size_t j=0; j<C.columns(); ++j ) {
439 for(
size_t j=0; j<B.rows(); ++j ) {
440 ConstIterator element( B.begin(j) );
441 const ConstIterator end( B.end(j) );
442 for( ; element!=end; ++element ) {
443 C(i ,element->index()) += A(i ,j) * element->value();
444 C(i+1,element->index()) += A(i+1,j) * element->value();
445 C(i+2,element->index()) += A(i+2,j) * element->value();
446 C(i+3,element->index()) += A(i+3,j) * element->value();
451 for(
size_t i=last; i<A.rows(); ++i ) {
452 for(
size_t j=0; j<C.columns(); ++j ) {
455 for(
size_t j=0; j<B.rows(); ++j ) {
456 ConstIterator element( B.begin(j) );
457 const ConstIterator end( B.end(j) );
458 for( ; element!=end; ++element ) {
459 C(i,element->index()) += A(i,j) * element->value();
480 template<
typename MT >
498 TDMatSMatMultExpr::selectColumnMajorAssignKernel( ~lhs, A, B );
518 template<
typename MT3
521 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
522 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
528 for(
size_t i=0; i<B.rows(); ++i ) {
529 ConstIterator element( B.begin(i) );
530 const ConstIterator end( B.end(i) );
531 for( ; element!=end; ++element ) {
532 for(
size_t j=0; j<A.rows(); ++j ) {
534 C(j,element->index()) = A(j,i) * element->value();
536 C(j,element->index()) += A(j,i) * element->value();
559 template<
typename MT3
562 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
563 selectColumnMajorAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
569 BLAZE_INTERNAL_ASSERT( ( A.rows() - ( A.rows() % 4UL ) ) == ( A.rows() & size_t(-4) ),
"Invalid end calculation" );
570 const size_t jend( A.rows() & size_t(-4) );
573 for(
size_t i=0UL; i<B.rows(); ++i ) {
574 ConstIterator element( B.begin(i) );
575 const ConstIterator end( B.end(i) );
577 const size_t nonzeros( B.nonZeros(i) );
578 const size_t kend( nonzeros &
size_t(-4) );
580 for(
size_t k=0UL; k<kend; k+=4UL )
582 const size_t i1( element->index() );
583 const ET2 v1( element->value() );
585 const size_t i2( element->index() );
586 const ET2 v2( element->value() );
588 const size_t i3( element->index() );
589 const ET2 v3( element->value() );
591 const size_t i4( element->index() );
592 const ET2 v4( element->value() );
595 for( j=0UL; j<jend; j+=4UL ) {
596 C(j ,i1) += A(j ,i) * v1;
597 C(j+1UL,i1) += A(j+1UL,i) * v1;
598 C(j+2UL,i1) += A(j+2UL,i) * v1;
599 C(j+3UL,i1) += A(j+3UL,i) * v1;
600 C(j ,i2) += A(j ,i) * v2;
601 C(j+1UL,i2) += A(j+1UL,i) * v2;
602 C(j+2UL,i2) += A(j+2UL,i) * v2;
603 C(j+3UL,i2) += A(j+3UL,i) * v2;
604 C(j ,i3) += A(j ,i) * v3;
605 C(j+1UL,i3) += A(j+1UL,i) * v3;
606 C(j+2UL,i3) += A(j+2UL,i) * v3;
607 C(j+3UL,i3) += A(j+3UL,i) * v3;
608 C(j ,i4) += A(j ,i) * v4;
609 C(j+1UL,i4) += A(j+1UL,i) * v4;
610 C(j+2UL,i4) += A(j+2UL,i) * v4;
611 C(j+3UL,i4) += A(j+3UL,i) * v4;
613 for( ; j<A.rows(); ++j ) {
614 C(j,i1) += A(j,i) * v1;
615 C(j,i2) += A(j,i) * v2;
616 C(j,i3) += A(j,i) * v3;
617 C(j,i4) += A(j,i) * v4;
621 for( ; element!=end; ++element ) {
622 for( j=0UL; j<jend; j+=4UL ) {
623 C(j ,element->index()) += A(j ,i) * element->value();
624 C(j+1UL,element->index()) += A(j+1UL,i) * element->value();
625 C(j+2UL,element->index()) += A(j+2UL,i) * element->value();
626 C(j+3UL,element->index()) += A(j+3UL,i) * element->value();
628 for( ; j<A.rows(); ++j ) {
629 C(j,element->index()) += A(j,i) * element->value();
649 template<
typename MT
655 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
667 const TmpType tmp(
serial( rhs ) );
686 template<
typename MT >
704 TDMatSMatMultExpr::selectRowMajorAddAssignKernel( ~lhs, A, B );
723 template<
typename MT3
726 static inline void selectRowMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
730 const size_t last( A.rows() & size_t(-4) );
733 for(
size_t i=0UL; i<last; i+=4UL ) {
734 for(
size_t j=0UL; j<B.rows(); ++j ) {
735 ConstIterator element( B.begin(j) );
736 const ConstIterator end( B.end(j) );
737 for( ; element!=end; ++element ) {
738 C(i ,element->index()) += A(i ,j) * element->value();
739 C(i+1UL,element->index()) += A(i+1UL,j) * element->value();
740 C(i+2UL,element->index()) += A(i+2UL,j) * element->value();
741 C(i+3UL,element->index()) += A(i+3UL,j) * element->value();
746 for(
size_t i=last; i<A.rows(); ++i ) {
747 for(
size_t j=0UL; j<B.rows(); ++j ) {
748 ConstIterator element( B.begin(j) );
749 const ConstIterator end( B.end(j) );
750 for( ; element!=end; ++element ) {
751 C(i,element->index()) += A(i,j) * element->value();
772 template<
typename MT >
790 TDMatSMatMultExpr::selectColumnMajorAddAssignKernel( ~lhs, A, B );
809 template<
typename MT3
812 static inline void selectColumnMajorAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
816 const size_t jend( A.rows() & size_t(-4) );
820 for(
size_t i=0UL; i<B.rows(); ++i ) {
821 ConstIterator element( B.begin(i) );
822 const ConstIterator end( B.end(i) );
824 const size_t nonzeros( B.nonZeros(i) );
825 const size_t kend( nonzeros &
size_t(-4) );
827 for(
size_t k=0UL; k<kend; k+=4UL )
829 const size_t i1( element->index() );
830 const ET2 v1( element->value() );
832 const size_t i2( element->index() );
833 const ET2 v2( element->value() );
835 const size_t i3( element->index() );
836 const ET2 v3( element->value() );
838 const size_t i4( element->index() );
839 const ET2 v4( element->value() );
842 for( j=0UL; j<jend; j+=4UL ) {
843 C(j ,i1) += A(j ,i) * v1;
844 C(j+1UL,i1) += A(j+1UL,i) * v1;
845 C(j+2UL,i1) += A(j+2UL,i) * v1;
846 C(j+3UL,i1) += A(j+3UL,i) * v1;
847 C(j ,i2) += A(j ,i) * v2;
848 C(j+1UL,i2) += A(j+1UL,i) * v2;
849 C(j+2UL,i2) += A(j+2UL,i) * v2;
850 C(j+3UL,i2) += A(j+3UL,i) * v2;
851 C(j ,i3) += A(j ,i) * v3;
852 C(j+1UL,i3) += A(j+1UL,i) * v3;
853 C(j+2UL,i3) += A(j+2UL,i) * v3;
854 C(j+3UL,i3) += A(j+3UL,i) * v3;
855 C(j ,i4) += A(j ,i) * v4;
856 C(j+1UL,i4) += A(j+1UL,i) * v4;
857 C(j+2UL,i4) += A(j+2UL,i) * v4;
858 C(j+3UL,i4) += A(j+3UL,i) * v4;
860 for( ; j<A.rows(); ++j ) {
861 C(j,i1) += A(j,i) * v1;
862 C(j,i2) += A(j,i) * v2;
863 C(j,i3) += A(j,i) * v3;
864 C(j,i4) += A(j,i) * v4;
868 for( ; element!=end; ++element ) {
869 for( j=0UL; j<jend; j+=4UL ) {
870 C(j ,element->index()) += A(j ,i) * element->value();
871 C(j+1UL,element->index()) += A(j+1UL,i) * element->value();
872 C(j+2UL,element->index()) += A(j+2UL,i) * element->value();
873 C(j+3UL,element->index()) += A(j+3UL,i) * element->value();
875 for( ; j<A.rows(); ++j ) {
876 C(j,element->index()) += A(j,i) * element->value();
901 template<
typename MT >
919 TDMatSMatMultExpr::selectRowMajorSubAssignKernel( ~lhs, A, B );
938 template<
typename MT3
941 static inline void selectRowMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
945 const size_t last( A.rows() & size_t(-4) );
948 for(
size_t i=0UL; i<last; i+=4UL ) {
949 for(
size_t j=0UL; j<B.rows(); ++j ) {
950 ConstIterator element( B.begin(j) );
951 const ConstIterator end( B.end(j) );
952 for( ; element!=end; ++element ) {
953 C(i ,element->index()) -= A(i ,j) * element->value();
954 C(i+1UL,element->index()) -= A(i+1UL,j) * element->value();
955 C(i+2UL,element->index()) -= A(i+2UL,j) * element->value();
956 C(i+3UL,element->index()) -= A(i+3UL,j) * element->value();
961 for(
size_t i=last; i<A.rows(); ++i ) {
962 for(
size_t j=0UL; j<B.rows(); ++j ) {
963 ConstIterator element( B.begin(j) );
964 const ConstIterator end( B.end(j) );
965 for( ; element!=end; ++element ) {
966 C(i,element->index()) -= A(i,j) * element->value();
987 template<
typename MT >
1005 TDMatSMatMultExpr::selectColumnMajorSubAssignKernel( ~lhs, A, B );
1024 template<
typename MT3
1027 static inline void selectColumnMajorSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1031 const size_t jend( A.rows() & size_t(-4) );
1035 for(
size_t i=0UL; i<B.rows(); ++i ) {
1036 ConstIterator element( B.begin(i) );
1037 const ConstIterator end( B.end(i) );
1039 const size_t nonzeros( B.nonZeros(i) );
1040 const size_t kend( nonzeros &
size_t(-4) );
1042 for(
size_t k=0UL; k<kend; k+=4UL )
1044 const size_t i1( element->index() );
1045 const ET2 v1( element->value() );
1047 const size_t i2( element->index() );
1048 const ET2 v2( element->value() );
1050 const size_t i3( element->index() );
1051 const ET2 v3( element->value() );
1053 const size_t i4( element->index() );
1054 const ET2 v4( element->value() );
1057 for( j=0UL; j<jend; j+=4UL ) {
1058 C(j ,i1) -= A(j ,i) * v1;
1059 C(j+1UL,i1) -= A(j+1UL,i) * v1;
1060 C(j+2UL,i1) -= A(j+2UL,i) * v1;
1061 C(j+3UL,i1) -= A(j+3UL,i) * v1;
1062 C(j ,i2) -= A(j ,i) * v2;
1063 C(j+1UL,i2) -= A(j+1UL,i) * v2;
1064 C(j+2UL,i2) -= A(j+2UL,i) * v2;
1065 C(j+3UL,i2) -= A(j+3UL,i) * v2;
1066 C(j ,i3) -= A(j ,i) * v3;
1067 C(j+1UL,i3) -= A(j+1UL,i) * v3;
1068 C(j+2UL,i3) -= A(j+2UL,i) * v3;
1069 C(j+3UL,i3) -= A(j+3UL,i) * v3;
1070 C(j ,i4) -= A(j ,i) * v4;
1071 C(j+1UL,i4) -= A(j+1UL,i) * v4;
1072 C(j+2UL,i4) -= A(j+2UL,i) * v4;
1073 C(j+3UL,i4) -= A(j+3UL,i) * v4;
1075 for( ; j<A.rows(); ++j ) {
1076 C(j,i1) -= A(j,i) * v1;
1077 C(j,i2) -= A(j,i) * v2;
1078 C(j,i3) -= A(j,i) * v3;
1079 C(j,i4) -= A(j,i) * v4;
1083 for( ; element!=end; ++element ) {
1084 for( j=0UL; j<jend; j+=4UL ) {
1085 C(j ,element->index()) -= A(j ,i) * element->value();
1086 C(j+1UL,element->index()) -= A(j+1UL,i) * element->value();
1087 C(j+2UL,element->index()) -= A(j+2UL,i) * element->value();
1088 C(j+3UL,element->index()) -= A(j+3UL,i) * element->value();
1090 for( ; j<A.rows(); ++j ) {
1091 C(j,element->index()) -= A(j,i) * element->value();
1126 template<
typename MT
1128 friend inline typename EnableIf< UseSMPAssign<MT> >::Type
1166 template<
typename MT
1168 friend inline typename EnableIf< UseSMPAssign<MT> >::Type
1173 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
1185 const TmpType tmp( rhs );
1206 template<
typename MT
1208 friend inline typename EnableIf< UseSMPAssign<MT> >::Type
1250 template<
typename MT
1252 friend inline typename EnableIf< UseSMPAssign<MT> >::Type
1337 template<
typename T1
1339 inline const TDMatSMatMultExpr<T1,T2>
1345 throw std::invalid_argument(
"Matrix sizes do not match" );
1362 template<
typename MT1,
typename MT2,
typename VT >
1367 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1368 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1369 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1370 ,
typename TDMatDVecMultExprTrait< MT1, typename SMatDVecMultExprTrait<MT2,VT>::Type >::Type
1371 , INVALID_TYPE >::Type Type;
1380 template<
typename MT1,
typename MT2,
typename VT >
1385 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1386 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1387 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1388 ,
typename TDMatSVecMultExprTrait< MT1, typename SMatSVecMultExprTrait<MT2,VT>::Type >::Type
1389 , INVALID_TYPE >::Type Type;
1398 template<
typename VT,
typename MT1,
typename MT2 >
1403 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1404 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1405 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1406 ,
typename TDMatDVecMultExprTrait< MT1, typename SMatDVecMultExprTrait<MT2,VT>::Type >::Type
1407 , INVALID_TYPE >::Type Type;
1416 template<
typename VT,
typename MT1,
typename MT2 >
1421 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1422 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1423 IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1424 ,
typename TDVecSMatMultExprTrait< typename TSVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1425 , INVALID_TYPE >::Type Type;
1434 template<
typename MT1,
typename MT2,
bool AF >
1439 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
1440 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
1449 template<
typename MT1,
typename MT2 >
1454 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1463 template<
typename MT1,
typename MT2 >
1468 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:308
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:254
Header file for the SMatDVecMultExprTrait class template.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:171
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4599
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:4329
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:152
Header file for the IsSparseMatrix type trait.
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4642
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
#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:204
Header file for the IsColumnMajorMatrix type trait.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:251
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:173
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:690
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:183
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:244
TDMatSMatMultExpr< MT1, MT2 > This
Type of this TDMatSMatMultExpr instance.
Definition: TDMatSMatMultExpr.h:168
ResultType::ElementType ElementType
Resulting element type.
Definition: TDMatSMatMultExpr.h:172
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:286
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:298
Constraint on the data type.
Header file for the MultExprTrait class template.
void smpAddAssign(DenseMatrix< 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:122
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 multiplication trait.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:169
#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:2412
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:326
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:180
Header file for the TDMatSVecMultExprTrait class template.
Header file for the DenseMatrix base class.
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:271
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:113
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:177
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:264
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2406
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.
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatSMatMultExpr.h:170
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:92
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: StorageOrder.h:81
Header file for run time assertion macros.
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:141
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:301
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.
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:331
Header file for the isDefault shim.
#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:186
MT2::ResultType RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:111
MT1::CompositeType CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:114
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:325
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
MT2::CompositeType CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:115
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:2403
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:112
Header file for basic type definitions.
Header file for the IsColumnVector type trait.
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:219
MT1::ResultType RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:110
RightOperand rightOperand() const
Returns the right-hand side sparse matrix operand.
Definition: TDMatSMatMultExpr.h:274
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSMatMultExpr.h:174
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSMatMultExpr.h:318