cppadcg-scalar.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2021 INRIA
3  */
4 
5 #ifndef __pycppad_cppad_codegen_cppadcg_scalar_hpp__
6 #define __pycppad_cppad_codegen_cppadcg_scalar_hpp__
7 
8 #include <cppad/cg/cppadcg.hpp>
9 #include <eigenpy/eigenpy.hpp>
10 
11 #include "pycppad/codegen/cg.hpp"
15 #include "pycppad/ad.hpp"
16 #include "pycppad/independent.hpp"
17 #include "pycppad/ad_fun.hpp"
18 
19 namespace pycppad
20 {
21  namespace codegen
22  {
23  template<typename Scalar>
25  {
26  namespace bp = boost::python;
27  typedef ::CppAD::cg::CG<Scalar> CGScalar;
28  typedef ::CppAD::AD<CGScalar> ADCGScalar;
29  typedef Eigen::Matrix<ADCGScalar,Eigen::Dynamic,1> VectorADCG;
30  typedef Eigen::Matrix<ADCGScalar,1,Eigen::Dynamic> RowVectorADCG;
31 
32  eigenpy::exposeType<CGScalar>();
33  eigenpy::exposeType<CGScalar,Eigen::RowMajor>();
34 
35  eigenpy::exposeType<ADCGScalar>();
36  eigenpy::exposeType<ADCGScalar,Eigen::RowMajor>();
37 
39 
44 
47  LangCDefaultVariableNameGeneratorVisitor<Scalar>::expose("LangCDefaultVariableNameGenerator");
48 
49 
50 
51  }
52  }
53 }
54 
55 #endif // ifndef __pycppad_cppad_codegen_cppadcg_scalar_hpp__
static void expose(const std::string &class_name="ADFun")
Definition: ad_fun.hpp:94
static void expose(const std::string &class_name="AD")
Definition: ad.hpp:105
static void expose(const std::string &func_name="Independent")
Definition: independent.hpp:34
static void expose(const std::string &class_name="CG")
Definition: cg.hpp:161
static void expose(const std::string &class_name="CodeHandler")
Definition: code-handler.hpp:133
static void expose(const std::string &class_name="LangCDefaultVariableNameGenerator")
Definition: lang-c-default-var-name-gen.hpp:30
static void expose(const std::string &class_name="LanguageC")
Definition: language-c.hpp:31
void exposeCppADCGScalar()
Definition: cppadcg-scalar.hpp:24
Definition: ad.hpp:15