Skip to content

Commit 51fa5ca

Browse files
committed
[codegen/cg] expose cppadcg scalar
1 parent a05717c commit 51fa5ca

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2021 INRIA
3+
*/
4+
5+
#ifndef __pycppad_cppad_codegen_scalar_hpp__
6+
#define __pycppad_cppad_codegen_scalar_hpp__
7+
8+
#include <cppad/cg/cppadcg.hpp>
9+
#include <eigenpy/eigenpy.hpp>
10+
11+
#include "pycppad/codegen/cg.hpp"
12+
13+
14+
namespace pycppad
15+
{
16+
namespace codegen {
17+
18+
template<typename Scalar>
19+
void exposeCppADCGScalar()
20+
{
21+
typedef ::CppAD::cg::CG<Scalar> CGScalar;
22+
23+
eigenpy::exposeType<CGScalar>();
24+
eigenpy::exposeType<CGScalar,Eigen::RowMajor>();
25+
26+
CGVisitor<Scalar>::expose();
27+
}
28+
}
29+
}
30+
31+
#endif // ifndef __pycppad_cppad_scalar_hpp__

0 commit comments

Comments
 (0)