27 #ifndef MPBLOCKS_CUDA_POLYNOMIAL_OSTREAM_H_
28 #define MPBLOCKS_CUDA_POLYNOMIAL_OSTREAM_H_
40 namespace polynomial {
44 template <
typename Scalar,
class Exp,
class Spec >
47 template <
class Scalar,
class Exp,
int Head,
class Tail >
50 static void print( std::ostream& out,
const Exp& exp)
52 Scalar val = get<Head>(exp);
54 out << val <<
" s^" << Head <<
" + ";
59 template <
class Scalar,
class Exp,
class Tail >
62 static void print( std::ostream& out,
const Exp& exp)
64 Scalar val = get<1>(exp);
66 out << val <<
" s + ";
71 template <
class Scalar,
class Exp,
class Tail >
74 static void print( std::ostream& out,
const Exp& exp)
76 Scalar val = get<0>(exp);
84 template <
class Scalar,
class Exp>
87 static void print( std::ostream& out,
const Exp& exp )
92 template <
class Scalar,
class Exp,
class Spec>
115 #endif // IOSTREAM_H_
std::ostream & operator<<(std::ostream &out, const RValue< Scalar, Exp, Spec > &exp)
static void print(std::ostream &out, const Exp &exp)
std::ostream & print(std::ostream &out, SturmSequence< Scalar > const &seq, const std::string &var="x")
expression template for rvalues
static void print(std::ostream &out, const Exp &exp)
static void print(std::ostream &out, const Exp &exp)
compile time integer list (because cuda doesn't understand variadic templates )
static void print(std::ostream &out, const Exp &exp)