22 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_H_
68 template<
typename MT1
76 typedef typename MT1::ResultType
RT1;
77 typedef typename MT2::ResultType
RT2;
78 typedef typename MT1::ReturnType
RN1;
79 typedef typename MT2::ReturnType
RN2;
118 enum { vectorizable = 0 };
169 return lhs_.columns();
199 template<
typename T >
223 template<
typename MT
253 template<
typename MT
269 const TmpType tmp( rhs );
288 template<
typename MT
318 template<
typename MT
393 template<
typename T1
395 const DMatTSMatAddExpr<T1,T2>
399 throw std::invalid_argument(
"Matrix sizes do not match" );
436 template<
typename T1
438 const DMatTSMatAddExpr<T1,T2>
442 throw std::invalid_argument(
"Matrix sizes do not match" );
470 template<
typename T1
474 inline const typename AddExprTrait< DMatTSMatAddExpr<T1,T2>, T3 >::Type
475 operator+(
const DMatTSMatAddExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
477 return ( lhs.leftOperand() + (~rhs) ) + lhs.rightOperand();
496 template<
typename T1
500 inline const typename SubExprTrait< DMatTSMatAddExpr<T1,T2>, T3 >::Type
501 operator-(
const DMatTSMatAddExpr<T1,T2>& lhs,
const DenseMatrix<T3,SO>& rhs )
503 return ( lhs.leftOperand() - (~rhs) ) + lhs.rightOperand();
519 template<
typename MT1,
typename MT2,
typename MT3 >
520 struct DMatDMatAddExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
525 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
526 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
527 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
528 ,
typename DMatTSMatAddExprTrait< typename DMatDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
529 , INVALID_TYPE >::Type Type;
539 template<
typename MT1,
typename MT2,
typename MT3 >
540 struct DMatTDMatAddExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
545 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
546 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
547 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
548 ,
typename DMatTSMatAddExprTrait< typename DMatTDMatAddExprTrait<MT1,MT3>::Type, MT2 >::Type
549 , INVALID_TYPE >::Type Type;
559 template<
typename MT1,
typename MT2,
typename MT3 >
560 struct DMatDMatSubExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
565 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
566 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
567 IsDenseMatrix<MT3>::value && IsRowMajorMatrix<MT3>::value
568 ,
typename DMatTSMatAddExprTrait< typename DMatDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
569 , INVALID_TYPE >::Type Type;
579 template<
typename MT1,
typename MT2,
typename MT3 >
580 struct DMatTDMatSubExprTrait< DMatTSMatAddExpr<MT1,MT2>, MT3 >
585 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
586 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
587 IsDenseMatrix<MT3>::value && IsColumnMajorMatrix<MT3>::value
588 ,
typename DMatTSMatAddExprTrait< typename DMatTDMatSubExprTrait<MT1,MT3>::Type, MT2 >::Type
589 , INVALID_TYPE >::Type Type;