27 #ifndef MPBLOCKS_CUDA_POLYNOMIAL_DIFFERENCE_H_
28 #define MPBLOCKS_CUDA_POLYNOMIAL_DIFFERENCE_H_
32 namespace polynomial {
35 template <
typename Scalar,
36 class Exp1,
class Spec1,
37 class Exp2,
class Spec2>
39 public RValue<Scalar, Difference<Scalar,Exp1,Spec1,Exp2,Spec2>,
40 typename intlist::make_union<Spec1,Spec2>::result >
55 return A.eval(x) -
B.eval(x);
61 template <
typename Scalar,
62 class Exp1,
class Spec1,
63 class Exp2,
class Spec2>
70 template <
int idx,
typename Scalar,
71 class Exp1,
class Spec1,
72 class Exp2,
class Spec2>
76 return get<idx>( sum.A ) - get<idx>( sum.B );
82 template <
typename Scalar,
class Exp1,
class Spec1,
class Exp2,
class Spec2>
90 static_cast<Exp1 const&>(A),
91 static_cast<Exp2 const&>(B));
103 #endif // DIFFERENCE_H_
__host__ __device__ Difference(Exp1 const &A, Exp2 const &B)
expression template for rvalues
__host__ __device__ Difference< Scalar, Exp1, Spec1, Exp2, Spec2 > operator-(RValue< Scalar, Exp1, Spec1 > const &A, RValue< Scalar, Exp2, Spec2 > const &B)
__host__ __device__ Scalar eval(Scalar x)
expression template for sum of two matrix expressions
strip_dups< typename merge_sort< typename join< IntList1, IntList2 >::result >::result >::result result
intlist::make_union< Spec1, Spec2 >::result result