fwd.hpp 1.12 KB
Newer Older
1
/*
2
 * Copyright 2014-2020 CNRS INRIA
3
4
5
6
7
 */

#ifndef __eigenpy_fwd_hpp__
#define __eigenpy_fwd_hpp__

8
9
#include "eigenpy/config.hpp"

10
11
12
13
// Silence a warning about a deprecated use of boost bind by boost python
// at least fo boost 1.73 to 1.75
// ref. https://github.com/stack-of-tasks/tsid/issues/128
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
14
#include <boost/python.hpp>
15
#include <boost/python/scope.hpp>
16

17
18
19
#define NO_IMPORT_ARRAY
  #include "eigenpy/numpy.hpp"
#undef NO_IMPORT_ARRAY
20

21
22
23
24
#undef BOOST_BIND_GLOBAL_PLACEHOLDERS

#include <Eigen/Core>

25
26
#if EIGEN_VERSION_AT_LEAST(3,2,90)
  #define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned16
27
#else
28
29
  #define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned
#endif
30

31
32
#define EIGENPY_NO_ALIGNMENT_VALUE Eigen::Unaligned

33
34
#define EIGENPY_UNUSED_VARIABLE(var) (void)(var)

35
36
#include "eigenpy/expose.hpp"

37
38
namespace eigenpy
{
39
  template<typename MatType, typename Scalar = typename boost::remove_reference<MatType>::type::Scalar> struct EigenToPy;
40
  template<typename MatType, typename Scalar = typename boost::remove_reference<MatType>::type::Scalar> struct EigenFromPy;
41
42
}

43
#endif // ifndef __eigenpy_fwd_hpp__