27 #ifndef MPBLOCKS_CUDA_POLYNOMIAL_LVALUE_H_
28 #define MPBLOCKS_CUDA_POLYNOMIAL_LVALUE_H_
34 namespace polynomial {
37 template<
int idx,
typename Scalar,
class Exp1 >
44 template <
typename Scalar,
class Exp1,
class Exp2,
class Spec>
47 template <
typename Scalar,
class Exp1,
class Exp2,
int Head,
class Tail>
53 set<Head>(
lvalue ) = get<Head>( rvalue );
58 template <
typename Scalar,
class Exp1,
class Exp2,
int Tail>
64 set<Tail>(
lvalue ) = get<Tail>( rvalue );
72 template <
int n,
typename Scalar,
class Exp,
class Spec>
84 template <
typename Scalar,
class Exp>
87 template <
int n,
typename Scalar,
class Exp1,
class InSpec,
class Exp2>
94 template <
typename Scalar,
class Exp>
108 template <
int n,
class Exp2,
class Spec2>
113 differentiate<n>( surrogate.
exp, *this );
121 template <
typename Scalar,
class Exp>
143 #endif // MATRIXEXPRESSION_H_
__host__ __device__ RValue< Scalar, Exp, Spec > & rvalue(RValue< Scalar, Exp, Spec > &exp)
__host__ __device__ void differentiate(const RValue< Scalar, Exp1, InSpec > &in, LValue< Scalar, Exp2 > &out)
evaluate a polynomial
__host__ __device__ Scalar & set(Exp1 &)
__host__ __device__ LValue< Scalar, Exp > & lvalue(LValue< Scalar, Exp > &exp)
expression template for rvalues
__host__ static __device__ void assign(Exp1 &lvalue, const Exp2 &rvalue)
expression template for lvalues
__host__ __device__ DerivativeSurrogate(Exp const &exp)
__host__ __device__ LValue< Scalar, Exp > & operator=(DerivativeSurrogate< n, Scalar, Exp2, Spec2 > &surrogate)
intermediate object which allows LValue assignment operator to call differntiate expression template ...
__host__ static __device__ void assign(Exp1 &lvalue, const Exp2 &rvalue)
compile time integer list (because cuda doesn't understand variadic templates )
__host__ __device__ __forceinline__ void assign(Polynomial< Scalar, Spec > &p, const Exp &exp)