22 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATSUBEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_DMATTSMATSUBEXPR_H_
71 template<
typename MT1
79 typedef typename MT1::ResultType
RT1;
80 typedef typename MT2::ResultType
RT2;
81 typedef typename MT1::ReturnType
RN1;
82 typedef typename MT2::ReturnType
RN2;
121 enum { vectorizable = 0 };
169 return lhs_.columns();
199 template<
typename T >
202 (
rhs_.canAlias( alias ) );
212 template<
typename T >
214 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
236 template<
typename MT
268 template<
typename MT
286 const TmpType tmp( rhs );
305 template<
typename MT
337 template<
typename MT
414 template<
typename T1
416 inline const DMatTSMatSubExpr<T1,T2>
422 throw std::invalid_argument(
"Matrix sizes do not match" );
450 template<
typename T1
454 inline const typename AddExprTrait< DMatTSMatSubExpr<T1,T2>, T3 >::Type
455 operator+(
const DMatTSMatSubExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
459 return ( lhs.leftOperand() + (~rhs) ) - lhs.rightOperand();
478 template<
typename T1
482 inline const typename SubExprTrait< DMatTSMatSubExpr<T1,T2>, T3 >::Type
483 operator-(
const DMatTSMatSubExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
487 return ( lhs.leftOperand() - (~rhs) ) - lhs.rightOperand();
503 template<
typename MT1,
typename MT2,
typename MT3 >
504 struct DMatDMatAddExprTrait< DMatTSMatSubExpr<MT1,MT2>, MT3 >
509 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
510 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
511 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
512 ,
typename DMatTSMatSubExprTrait< typename DMatDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
513 , INVALID_TYPE >::Type Type;
523 template<
typename MT1,
typename MT2,
typename MT3 >
524 struct DMatTDMatAddExprTrait< DMatTSMatSubExpr<MT1,MT2>, MT3 >
529 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
530 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
531 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
532 ,
typename DMatTSMatSubExprTrait< typename DMatTDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
533 , INVALID_TYPE >::Type Type;
543 template<
typename MT1,
typename MT2,
typename MT3 >
544 struct DMatDMatSubExprTrait< DMatTSMatSubExpr<MT1,MT2>, MT3 >
549 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
550 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
551 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
552 ,
typename DMatTSMatSubExprTrait< typename DMatDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
553 , INVALID_TYPE >::Type Type;
563 template<
typename MT1,
typename MT2,
typename MT3 >
564 struct DMatTDMatSubExprTrait< DMatTSMatSubExpr<MT1,MT2>, MT3 >
569 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
570 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
571 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
572 ,
typename DMatTSMatSubExprTrait< typename DMatTDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
573 , INVALID_TYPE >::Type Type;
583 template<
typename MT1,
typename MT2 >
584 struct RowExprTrait< DMatTSMatSubExpr<MT1,MT2> >
588 typedef typename SubExprTrait< typename RowExprTrait<const MT1>::Type
589 ,
typename RowExprTrait<const MT2>::Type >::Type Type;
598 template<
typename MT1,
typename MT2 >
599 struct ColumnExprTrait< DMatTSMatSubExpr<MT1,MT2> >
603 typedef typename SubExprTrait< typename ColumnExprTrait<const MT1>::Type
604 ,
typename ColumnExprTrait<const MT2>::Type >::Type Type;