-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 749 Bytes
/
main.cpp
File metadata and controls
35 lines (27 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright 2021 INRIA
*/
#include <Eigen/Core>
#include <eigenpy/eigenpy.hpp>
#include "pycppad/cppad.hpp"
#include "pycppad/ad.hpp"
#include "pycppad/independent.hpp"
#include <sstream>
inline std::string printVersion(const std::string & delimiter = ".")
{
std::ostringstream oss;
oss
<< PYCPPAD_MAJOR_VERSION << delimiter
<< PYCPPAD_MINOR_VERSION << delimiter
<< PYCPPAD_PATCH_VERSION;
return oss.str();
}
namespace bp = boost::python;
BOOST_PYTHON_MODULE(pycppad_pywrap)
{
bp::docstring_options module_docstring_options(true,true,false);
bp::scope().attr("__version__") = printVersion();
bp::scope().attr("__raw_version__") = bp::str(PYCPPAD_VERSION);
eigenpy::enableEigenPy();
pycppad::enablePyCppAD();
}