27 #ifndef MPBLOCKS_CUDA_LINALG2_DIFFERENCE_H_
28 #define MPBLOCKS_CUDA_LINALG2_DIFFERENCE_H_
35 template <
typename Scalar, Size_t ROWS, Size_t COLS,
class Exp1,
class Exp2>
37 public RValue< Scalar, ROWS, COLS, Difference< Scalar, ROWS, COLS, Exp1, Exp2> >
54 return m_A.Exp1::template ve<i>()
55 -
m_B.Exp2::template ve<i>();
59 template< Size_t i, Size_t j >
63 return m_A.Exp1::template me<i,j>()
64 -
m_B.Exp2::template me<i,j>();
71 template <
typename Scalar, Size_t ROWS, Size_t COLS,
class Exp1,
class Exp2>
73 Difference< Scalar, ROWS, COLS, Exp1, Exp2 >
78 static_cast< Exp1 const&
>(A),
79 static_cast< Exp2 const& >(B) );
94 #endif // DIFFERENCE_H_
__device__ __host__ Difference(Exp1 const &A, Exp2 const &B)
expression template for rvalues
__device__ __host__ Scalar me() const
return the evaluated (j,i)'th element of a matrix expression
__device__ __host__ Scalar ve() const
return the evaluated i'th element of a vector expression
__device__ __host__ Difference< Scalar, ROWS, COLS, Exp1, Exp2 > operator-(RValue< Scalar, ROWS, COLS, Exp1 > const &A, RValue< Scalar, ROWS, COLS, Exp2 > const &B)
expression template for difference of two expressions