22 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_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_.canAlias( alias ) ||
rhs_.canAlias( 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 const DMatTSMatAddExpr<T1,T2>
422 throw std::invalid_argument(
"Matrix sizes do not match" );
459 template<
typename T1
461 const DMatTSMatAddExpr<T1,T2>
467 throw std::invalid_argument(
"Matrix sizes do not match" );
495 template<
typename T1
499 inline const typename AddExprTrait< DMatTSMatAddExpr<T1,T2>, T3 >::Type
500 operator+(
const DMatTSMatAddExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
504 return ( lhs.leftOperand() + (~rhs) ) + lhs.rightOperand();
523 template<
typename T1
527 inline const typename SubExprTrait< DMatTSMatAddExpr<T1,T2>, T3 >::Type
528 operator-(
const DMatTSMatAddExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
532 return ( lhs.leftOperand() - (~rhs) ) + lhs.rightOperand();
548 template<
typename MT1,
typename MT2,
typename MT3 >
549 struct DMatDMatAddExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
554 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
555 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
556 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
557 ,
typename DMatTSMatAddExprTrait< typename DMatDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
558 , INVALID_TYPE >::Type Type;
568 template<
typename MT1,
typename MT2,
typename MT3 >
569 struct DMatTDMatAddExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
574 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
575 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
576 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
577 ,
typename DMatTSMatAddExprTrait< typename DMatTDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
578 , INVALID_TYPE >::Type Type;
588 template<
typename MT1,
typename MT2,
typename MT3 >
589 struct DMatDMatSubExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
594 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
595 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
596 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
597 ,
typename DMatTSMatAddExprTrait< typename DMatDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
598 , INVALID_TYPE >::Type Type;
608 template<
typename MT1,
typename MT2,
typename MT3 >
609 struct DMatTDMatSubExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
614 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
615 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
616 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
617 ,
typename DMatTSMatAddExprTrait< typename DMatTDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
618 , INVALID_TYPE >::Type Type;
628 template<
typename MT1,
typename MT2 >
629 struct RowExprTrait< DMatTSMatAddExpr<MT1,MT2> >
633 typedef typename AddExprTrait< typename RowExprTrait<const MT1>::Type
634 ,
typename RowExprTrait<const MT2>::Type >::Type Type;
643 template<
typename MT1,
typename MT2 >
644 struct ColumnExprTrait< DMatTSMatAddExpr<MT1,MT2> >
648 typedef typename AddExprTrait< typename ColumnExprTrait<const MT1>::Type
649 ,
typename ColumnExprTrait<const MT2>::Type >::Type Type;