Skip to content

Commit d9cf8d9

Browse files
committed
[All] Add alignment EIGENPY_DEFAULT_ALIGNMENT_VALUE
1 parent 620f95b commit d9cf8d9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/fwd.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
2+
* Copyright 2014-2018, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
33
*
44
* This file is part of eigenpy.
55
* eigenpy is free software: you can redistribute it and/or
@@ -20,8 +20,17 @@
2020
#include <boost/python.hpp>
2121
#include <Eigen/Core>
2222

23+
#include <numpy/numpyconfig.h>
2324
#ifdef NPY_1_8_API_VERSION
2425
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
2526
#endif
2627

28+
#include <numpy/noprefix.h>
29+
30+
#ifdef NPY_ALIGNED
31+
#define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned16
32+
#else
33+
#define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Unaligned
34+
#endif
35+
2736
#endif // ifndef __eigenpy_fwd_hpp__

0 commit comments

Comments
 (0)