27 #ifndef MPBLOCKS_CUDA_LINALG_DIFFERENCE_H_
28 #define MPBLOCKS_CUDA_LINALG_DIFFERENCE_H_
35 template <
typename Scalar,
class Exp1,
class Exp2>
37 public RValue<Scalar, Difference<Scalar,Exp1,Exp2> >
87 return (
m_A(i,j) -
m_B(i,j) );
92 template <
typename Scalar,
class Exp1,
class Exp2>
98 static_cast<Exp1 const&
>(A),
99 static_cast<Exp2 const&>(B) );
116 #endif // DIFFERENCE_H_
__device__ __host__ Scalar operator[](Size_t i) const
return the evaluated i'th element of a vector expression
__device__ __host__ Size_t cols() const
return the columns of a matrix expression
expression template for difference of two matrix expressions
__device__ __host__ Size_t size() const
return the size for a vector
__device__ __host__ Size_t rows() const
return the rows of a matrix expression
expression template for rvalues
__device__ __host__ Scalar operator()(Size_t i, Size_t j) const
return the evaluated (i,j)'th element of a matrix expression
__device__ __host__ Difference< Scalar, Exp1, Exp2 > operator-(RValue< Scalar, Exp1 > const &A, RValue< Scalar, Exp2 > const &B)
__device__ __host__ Difference(Exp1 const &A, Exp2 const &B)