27 #ifndef MPBLOCKS_CUDA_POLYNOMIAL_QUOTIENT_H_
28 #define MPBLOCKS_CUDA_POLYNOMIAL_QUOTIENT_H_
32 namespace polynomial {
37 template <
typename Scalar,
38 class ExpNum,
class SpecNum,
39 class ExpDen,
class SpecDen >
57 template <
typename Scalar,
58 class ExpNum,
class SpecNum,
59 class ExpDen,
class SpecDen >
78 template<
int size,
int min >
84 ExpNum
const& N, ExpDen
const& D )
90 Scalar t =
get<size-1>(
r) /
91 get<max_coeff_denominator>(D);
101 template<
int size,
int min >
107 ExpNum
const& N, ExpDen
const& D )
122 ExpNum
const& N, ExpDen
const& D )
145 ,ExpDen,SpecDen>& surrogate )
152 ,ExpDen,SpecDen>& surrogate )
161 template <
typename Scalar,
162 class Exp1,
class Spec1,
163 class Exp2,
class Spec2 >
170 static_cast<Exp1 const&
>(A),
171 static_cast<Exp2 const&>(B));
185 #endif // QUOTIENT_H_
A sparse, statically sized polynomial.
__host__ __device__ Quotient(const QuotientSurrogate< Scalar, ExpNum, SpecNum, ExpDen, SpecDen > &surrogate)
Polynomial< Scalar, SpecRem > r
__host__ __device__ void operator=(const QuotientSurrogate< Scalar, ExpNum, SpecNum, ExpDen, SpecDen > &surrogate)
__host__ __device__ Quotient()
__host__ static __device__ void step(Polynomial< Scalar, SpecQuot > &q, Polynomial< Scalar, SpecRem > &r, ExpNum const &N, ExpDen const &D)
expression template for polynomial long division
expression template for rvalues
__host__ static __device__ void step(Polynomial< Scalar, SpecQuot > &q, Polynomial< Scalar, SpecRem > &r, ExpNum const &N, ExpDen const &D)
__host__ __device__ Quotient(ExpNum const &N, ExpDen const &D)
__host__ __device__ void construct(ExpNum const &N, ExpDen const &D)
intlist::range< 0, max_coeff_remainder >::result SpecRem
__host__ static __device__ void work(Polynomial< Scalar, SpecQuot > &q, Polynomial< Scalar, SpecRem > &r, ExpNum const &N, ExpDen const &D)
__host__ __device__ QuotientSurrogate(const ExpNum &Num, const ExpDen &Den)
surrogate for initialzing with / operator
retrieve the max element of the list (linear without short circut so it works with non-sorted arrays ...
Polynomial< Scalar, SpecQuot > q
__host__ __device__ QuotientSurrogate< Scalar, Exp1, Spec1, Exp2, Spec2 > operator/(RValue< Scalar, Exp1, Spec1 > const &A, RValue< Scalar, Exp2, Spec2 > const &B)
intlist::range< 0, max_coeff_quotient >::result SpecQuot