27 #ifndef MPBLOCKS_CUDA_LINALG2_LVALUE_H_
28 #define MPBLOCKS_CUDA_LINALG2_LVALUE_H_
35 template <
typename Scalar, Size_t ROWS, Size_t COLS,
class Exp>
45 return static_cast<Exp&
>(*this).Exp::template ve<i>();
52 Scalar
const&
ve()
const
54 return static_cast<Exp const&
>(*this).Exp::template ve<i>();
59 template< Size_t i, Size_t j >
63 return static_cast<Exp&
>(*this).Exp::template me<i,j>();
68 template< Size_t i, Size_t j >
70 Scalar
const&
me()
const
72 return static_cast<Exp const&
>(*this).Exp::template me<i,j>();
76 template<
typename Exp2 >
82 static_cast<Exp&>(*
this),
83 static_cast<Exp2 const&>(B) );
95 static_cast<Exp&
>(*this) );
111 #endif // MATRIXEXPRESSION_H_
__device__ __host__ Scalar const & ve() const
return an immutable reference to the i'th element of the vector expression
expression template for rvalues
__device__ __host__ Scalar const & me() const
return an immutable reference to the (i,j)th element of the matrix expression
__device__ __host__ AssignmentIterator< Scalar, ROWS, COLS, 0, 1, Exp > operator<<(Scalar x)
return an assignment iterator
__device__ __host__ LValue< Scalar, ROWS, COLS, Exp > & operator=(RValue< Scalar, ROWS, COLS, Exp2 > const &B)
assignment
__device__ __host__ Scalar & me()
return a mutable reference to the (i,j)th element of the matrix expression
__device__ static __host__ void doit(Exp1 &A, Exp2 const &B)
expression template for rvalues
__device__ __host__ Scalar & ve()
return a mutable reference to the i'th element of the vector expression