From d9cf8d9f9e55b043cc491d518159846bef872d3e Mon Sep 17 00:00:00 2001
From: jcarpent <jcarpent@laas.fr>
Date: Tue, 9 Jan 2018 19:24:27 +0100
Subject: [PATCH] [All] Add alignment EIGENPY_DEFAULT_ALIGNMENT_VALUE

---
 src/fwd.hpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/fwd.hpp b/src/fwd.hpp
index ab9cf71..d5d1f2e 100644
--- a/src/fwd.hpp
+++ b/src/fwd.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
+ * Copyright 2014-2018, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
  *
  * This file is part of eigenpy.
  * eigenpy is free software: you can redistribute it and/or
@@ -20,8 +20,17 @@
 #include <boost/python.hpp>
 #include <Eigen/Core>
 
+#include <numpy/numpyconfig.h>
 #ifdef NPY_1_8_API_VERSION
 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
 #endif
 
+#include <numpy/noprefix.h>
+
+#ifdef NPY_ALIGNED
+#define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Aligned16
+#else
+#define EIGENPY_DEFAULT_ALIGNMENT_VALUE Eigen::Unaligned
+#endif
+
 #endif // ifndef __eigenpy_fwd_hpp__
-- 
GitLab