27 #ifndef MPBLOCKS_CUDA_LINALG2_PRODUCT_H_
28 #define MPBLOCKS_CUDA_LINALG2_PRODUCT_H_
39 template <
typename Scalar,
42 class Exp1,
class Exp2>
46 static Scalar
result(
const Exp1& A,
const Exp2& B )
49 ( A.Exp1::template me<i,k>() *
50 B.Exp2::template me<k,j>() ) +
56 template <
typename Scalar,
59 class Exp1,
class Exp2>
60 struct Iterator<Scalar,ROWS,COLS,COMMON,i,j,COMMON,Exp1,Exp2>
63 static Scalar
result(
const Exp1& A,
const Exp2& B )
73 template <
typename Scalar,
75 class Exp1,
class Exp2>
77 public RValue< Scalar, ROWS, COLS, Product< Scalar, ROWS, COLS, COMMON, Exp1, Exp2> >
105 template< Size_t i, Size_t j >
117 template <
typename Scalar,
119 class Exp1,
class Exp2>
121 Product< Scalar, ROWS, COLS, COMMON, Exp1, Exp2 >
126 static_cast< Exp1 const&
>(A),
127 static_cast< Exp2 const& >(B) );
expression template for product expressions
__device__ __host__ Scalar ve() const
return the evaluated i'th element of a vector expression
__device__ __host__ Scalar me() const
return the evaluated (j,i)'th element of a matrix expression
expression template for rvalues
__device__ __host__ Product(Exp1 const &A, Exp2 const &B)
__device__ __host__ Product< Scalar, ROWS, COLS, COMMON, Exp1, Exp2 > operator*(RValue< Scalar, ROWS, COMMON, Exp1 > const &A, RValue< Scalar, COMMON, COLS, Exp2 > const &B)
__device__ static __host__ Scalar result(const Exp1 &A, const Exp2 &B)
__device__ static __host__ Scalar result(const Exp1 &A, const Exp2 &B)
returns the result of the i,j element of the product