35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSMATDMATMULTEXPR_H_
121 template<
typename MT1
123 class TSMatDMatMultExpr :
public DenseMatrix< TSMatDMatMultExpr<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 && IsSymmetric<T2>::value };
168 template<
typename T1,
typename T2,
typename T3 >
169 struct IsEvaluationRequired {
170 enum { value = ( evaluateLeft || evaluateRight ) &&
171 !CanExploitSymmetry<T1,T2,T3>::value };
182 template<
typename T1,
typename T2,
typename T3 >
183 struct UseOptimizedKernel {
184 enum { value = !IsDiagonal<T3>::value &&
185 !IsResizable<typename T1::ElementType>::value &&
186 !IsResizable<ET1>::value };
196 template<
typename T1,
typename T2,
typename T3 >
197 struct UseDefaultKernel {
198 enum { value = !UseOptimizedKernel<T1,T2,T3>::value };
228 enum { vectorizable = 0 };
231 enum { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
232 !evaluateRight && MT2::smpAssignable };
275 :(
lhs_.columns() ) ) );
277 if(
lhs_.columns() == 0UL ||
281 ElementType tmp(
lhs_(i,kbegin) *
rhs_(kbegin,j) );
282 for(
size_t k=kbegin+1UL; k<kend; ++k ) {
306 return rhs_.columns();
336 template<
typename T >
338 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
348 template<
typename T >
350 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
360 return rhs_.isAligned();
393 template<
typename MT
403 LT A(
serial( rhs.lhs_ ) );
404 RT B(
serial( rhs.rhs_ ) );
413 TSMatDMatMultExpr::selectAssignKernel( ~lhs, A, B );
433 template<
typename MT3
437 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
445 for(
size_t i=0UL; i<A.columns(); ++i )
447 const ConstIterator
end( A.end(i) );
448 ConstIterator element( A.begin(i) );
450 for( ; element!=
end; ++element ) {
451 C(element->index(),i) = element->value() * B(i,i);
457 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
459 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
461 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
463 for(
size_t i=0UL; i<A.columns(); ++i )
465 const ConstIterator
end( A.end(i) );
466 ConstIterator element( A.begin(i) );
468 const size_t jbegin( ( IsUpper<MT5>::value )
469 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
471 const size_t jend( ( IsLower<MT5>::value )
472 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
478 for( ; element!=
end; ++element ) {
479 for(
size_t j=jbegin; j<jend; ++j ) {
481 C(element->index(),j) = element->value() * B(i,j);
483 C(element->index(),j) += element->value() * B(i,j);
508 template<
typename MT3
511 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
512 selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
516 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
518 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
520 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
522 for(
size_t i=0UL; i<A.rows(); ++i ) {
523 for(
size_t j=jj; j<jpos; ++j ) {
528 for(
size_t i=0UL; i<A.columns(); ++i )
530 const size_t jbegin( ( IsUpper<MT5>::value )
531 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
533 const size_t jend( ( IsLower<MT5>::value )
534 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
540 const ConstIterator
end( A.end(i) );
541 ConstIterator element( A.begin(i) );
543 const size_t nonzeros( A.nonZeros(i) );
544 const size_t kpos( nonzeros &
size_t(-4) );
547 for(
size_t k=0UL; k<kpos; k+=4UL )
549 const size_t i1( element->index() );
550 const ET1 v1( element->value() );
552 const size_t i2( element->index() );
553 const ET1 v2( element->value() );
555 const size_t i3( element->index() );
556 const ET1 v3( element->value() );
558 const size_t i4( element->index() );
559 const ET1 v4( element->value() );
564 for(
size_t j=jbegin; j<jend; ++j ) {
565 C(i1,j) += v1 * B(i,j);
566 C(i2,j) += v2 * B(i,j);
567 C(i3,j) += v3 * B(i,j);
568 C(i4,j) += v4 * B(i,j);
572 for( ; element!=
end; ++element ) {
573 for(
size_t j=jbegin; j<jend; ++j ) {
574 C(element->index(),j) += element->value() * B(i,j);
596 template<
typename MT
598 friend inline typename DisableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
603 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
615 const TmpType tmp(
serial( rhs ) );
636 template<
typename MT >
637 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
665 template<
typename MT
674 LT A(
serial( rhs.lhs_ ) );
675 RT B(
serial( rhs.rhs_ ) );
684 TSMatDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
703 template<
typename MT3
706 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
707 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
711 if( IsDiagonal<MT5>::value )
713 for(
size_t i=0UL; i<A.columns(); ++i )
715 const ConstIterator
end( A.end(i) );
716 ConstIterator element( A.begin(i) );
718 for( ; element!=
end; ++element ) {
719 C(element->index(),i) += element->value() * B(i,i);
725 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
727 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
729 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
731 for(
size_t i=0UL; i<A.columns(); ++i )
733 const ConstIterator
end( A.end(i) );
734 ConstIterator element( A.begin(i) );
736 const size_t jbegin( ( IsUpper<MT5>::value )
737 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
739 const size_t jend( ( IsLower<MT5>::value )
740 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
746 for( ; element!=
end; ++element ) {
747 for(
size_t j=jbegin; j<jend; ++j ) {
748 C(element->index(),j) += element->value() * B(i,j);
772 template<
typename MT3
775 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
776 selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
780 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
782 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
784 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
786 for(
size_t i=0UL; i<A.columns(); ++i )
788 const size_t jbegin( ( IsUpper<MT5>::value )
789 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
791 const size_t jend( ( IsLower<MT5>::value )
792 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
798 const ConstIterator
end( A.end(i) );
799 ConstIterator element( A.begin(i) );
801 const size_t nonzeros( A.nonZeros(i) );
802 const size_t kpos( nonzeros &
size_t(-4) );
805 for(
size_t k=0UL; k<kpos; k+=4UL )
807 const size_t i1( element->index() );
808 const ET1 v1( element->value() );
810 const size_t i2( element->index() );
811 const ET1 v2( element->value() );
813 const size_t i3( element->index() );
814 const ET1 v3( element->value() );
816 const size_t i4( element->index() );
817 const ET1 v4( element->value() );
822 for(
size_t j=jbegin; j<jend; ++j ) {
823 C(i1,j) += v1 * B(i,j);
824 C(i2,j) += v2 * B(i,j);
825 C(i3,j) += v3 * B(i,j);
826 C(i4,j) += v4 * B(i,j);
830 for( ; element!=
end; ++element ) {
831 for(
size_t j=jbegin; j<jend; ++j ) {
832 C(element->index(),j) += element->value() * B(i,j);
856 template<
typename MT >
857 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
889 template<
typename MT
898 LT A(
serial( rhs.lhs_ ) );
899 RT B(
serial( rhs.rhs_ ) );
908 TSMatDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
927 template<
typename MT3
930 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
931 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
935 if( IsDiagonal<MT5>::value )
937 for(
size_t i=0UL; i<A.columns(); ++i )
939 const ConstIterator
end( A.end(i) );
940 ConstIterator element( A.begin(i) );
942 for( ; element!=
end; ++element ) {
943 C(element->index(),i) -= element->value() * B(i,i);
949 const size_t block( IsRowMajorMatrix<MT3>::value ? 256UL : 8UL );
951 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
953 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
955 for(
size_t i=0UL; i<A.columns(); ++i )
957 const ConstIterator
end( A.end(i) );
958 ConstIterator element( A.begin(i) );
960 const size_t jbegin( ( IsUpper<MT5>::value )
961 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
963 const size_t jend( ( IsLower<MT5>::value )
964 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
970 for( ; element!=
end; ++element ) {
971 for(
size_t j=jbegin; j<jend; ++j ) {
972 C(element->index(),j) -= element->value() * B(i,j);
996 template<
typename MT3
999 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1000 selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1004 const size_t block( ( IsRowMajorMatrix<MT3>::value )?( 256UL ):( 8UL ) );
1006 for(
size_t jj=0UL; jj<B.columns(); jj+=block )
1008 const size_t jpos( ( jj+block > B.columns() )?( B.columns() ):( jj+block ) );
1010 for(
size_t i=0UL; i<A.columns(); ++i )
1012 const size_t jbegin( ( IsUpper<MT5>::value )
1013 ?(
max( IsStrictlyUpper<MT5>::value ? i+1UL : i, jj ) )
1015 const size_t jend( ( IsLower<MT5>::value )
1016 ?(
min( IsStrictlyLower<MT5>::value ? i : i+1UL, jpos ) )
1019 if( jbegin >= jend )
1022 const ConstIterator
end( A.end(i) );
1023 ConstIterator element( A.begin(i) );
1025 const size_t nonzeros( A.nonZeros(i) );
1026 const size_t kpos( nonzeros &
size_t(-4) );
1029 for(
size_t k=0UL; k<kpos; k+=4UL )
1031 const size_t i1( element->index() );
1032 const ET1 v1( element->value() );
1034 const size_t i2( element->index() );
1035 const ET1 v2( element->value() );
1037 const size_t i3( element->index() );
1038 const ET1 v3( element->value() );
1040 const size_t i4( element->index() );
1041 const ET1 v4( element->value() );
1046 for(
size_t j=jbegin; j<jend; ++j ) {
1047 C(i1,j) -= v1 * B(i,j);
1048 C(i2,j) -= v2 * B(i,j);
1049 C(i3,j) -= v3 * B(i,j);
1050 C(i4,j) -= v4 * B(i,j);
1054 for( ; element!=
end; ++element ) {
1055 for(
size_t j=jbegin; j<jend; ++j ) {
1056 C(element->index(),j) -= element->value() * B(i,j);
1080 template<
typename MT >
1081 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1124 template<
typename MT
1126 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1165 template<
typename MT
1167 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1172 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
1184 const TmpType tmp( rhs );
1205 template<
typename MT >
1206 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1235 template<
typename MT
1237 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1275 template<
typename MT >
1276 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1309 template<
typename MT
1311 friend inline typename EnableIf< IsEvaluationRequired<MT,MT1,MT2> >::Type
1349 template<
typename MT >
1350 friend inline typename EnableIf< CanExploitSymmetry<MT,MT1,MT2> >::Type
1427 template<
typename T1
1429 inline const TSMatDMatMultExpr<T1,T2>
1435 throw std::invalid_argument(
"Matrix sizes do not match" );
1452 template<
typename MT1,
typename MT2 >
1470 template<
typename MT1,
typename MT2 >
1472 :
public Columns<MT2>
1488 template<
typename MT1,
typename MT2 >
1490 :
public IsTrue< And< IsLower<MT1>, IsLower<MT2> >::value >
1506 template<
typename MT1,
typename MT2 >
1508 :
public IsTrue< And< IsUniLower<MT1>, IsUniLower<MT2> >::value >
1524 template<
typename MT1,
typename MT2 >
1526 :
public IsTrue< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1527 , And< IsStrictlyLower<MT2>, IsLower<MT1> > >::value >
1543 template<
typename MT1,
typename MT2 >
1545 :
public IsTrue< And< IsUpper<MT1>, IsUpper<MT2> >::value >
1561 template<
typename MT1,
typename MT2 >
1563 :
public IsTrue< And< IsUniUpper<MT1>, IsUniUpper<MT2> >::value >
1579 template<
typename MT1,
typename MT2 >
1581 :
public IsTrue< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1582 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > >::value >
1598 template<
typename MT1,
typename MT2,
typename VT >
1603 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1604 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1605 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1606 ,
typename TSMatDVecMultExprTrait< MT1, typename DMatDVecMultExprTrait<MT2,VT>::Type >::Type
1607 , INVALID_TYPE >::Type Type;
1616 template<
typename MT1,
typename MT2,
typename VT >
1621 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1622 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1623 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1624 ,
typename TSMatDVecMultExprTrait< MT1, typename DMatSVecMultExprTrait<MT2,VT>::Type >::Type
1625 , INVALID_TYPE >::Type Type;
1634 template<
typename VT,
typename MT1,
typename MT2 >
1639 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1640 IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1641 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1642 ,
typename TDVecDMatMultExprTrait< typename TDVecTSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1643 , INVALID_TYPE >::Type Type;
1652 template<
typename VT,
typename MT1,
typename MT2 >
1657 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1658 IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1659 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1660 ,
typename TDVecDMatMultExprTrait< typename TDVecTSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1661 , INVALID_TYPE >::Type Type;
1670 template<
typename MT1,
typename MT2,
bool AF >
1675 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1,AF>::Type
1676 ,
typename SubmatrixExprTrait<const MT2,AF>::Type >::Type Type;
1685 template<
typename MT1,
typename MT2 >
1690 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1699 template<
typename MT1,
typename MT2 >
1704 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:376
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
Header file for mathematical functions.
SelectType< evaluateLeft, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: TSMatDMatMultExpr.h:220
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.
MT2::CompositeType CT2
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:134
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: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
Header file for the TSVecTSMatMultExprTrait class template.
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
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
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.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
size_t rows() const
Returns the current number of rows of the matrix.
Definition: TSMatDMatMultExpr.h:295
Header file for the IsUniLower type trait.
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 canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TSMatDMatMultExpr.h:369
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Constraint on the data type.
Constraint on the data type.
Header file for the MultExprTrait class template.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: TSMatDMatMultExpr.h:305
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.
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:217
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
SelectType< evaluateRight, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:223
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TSMatDMatMultExpr.h:207
#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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TSMatDMatMultExpr.h:256
Header file for the TSVecTDMatMultExprTrait class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
Header file for the TDMatSVecMultExprTrait class template.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TSMatDMatMultExpr.h:349
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.
const size_t SMP_TSMATDMATMULT_THRESHOLD
SMP column-major sparse matrix/row-major dense matrix multiplication threshold.This threshold specifi...
Definition: Thresholds.h:1064
Header file for the DMatDVecMultExprTrait 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
TSMatDMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the TSMatDMatMultExpr class.
Definition: TSMatDMatMultExpr.h:241
#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
RT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TSMatDMatMultExpr.h:131
Header file for the IsTriangular type trait.
Constraints on the storage order of matrix types.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:206
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.
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TSMatDMatMultExpr.h:359
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
MT1::ResultType RT1
Result type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:129
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::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:208
TSMatDMatMultExpr< MT1, MT2 > This
Type of this TSMatDMatMultExpr instance.
Definition: TSMatDMatMultExpr.h:205
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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSMatDMatMultExpr.h:210
LeftOperand leftOperand() const
Returns the left-hand side transpose sparse matrix operand.
Definition: TSMatDMatMultExpr.h:315
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:150
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
RT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:132
RightOperand rightOperand() const
Returns the right-hand side dense matrix operand.
Definition: TSMatDMatMultExpr.h:325
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSMatDMatMultExpr.h:211
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: TSMatDMatMultExpr.h:377
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
Header file for the isDefault shim.
MT1::CompositeType CT1
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:133
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
#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.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TSMatDMatMultExpr.h:337
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
Header file for the IsRowMajorMatrix type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: TSMatDMatMultExpr.h:209
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 dense matrix expression.
Definition: TSMatDMatMultExpr.h:130
Expression object for transpose sparse matrix-dense matrix multiplications.The TSMatDMatMultExpr clas...
Definition: Forward.h:137
Header file for the TDVecDMatMultExprTrait class template.
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.
#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.
Header file for the TSVecDMatMultExprTrait class template.
Header file for the IsUpper type trait.
Header file for the DMatSVecMultExprTrait class template.
Header file for the IsColumnVector type trait.
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatDMatMultExpr.h:214
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
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