File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ SEARCH_FOR_BOOST()
7474SET (${PROJECT_NAME} _UTILS_HEADERS
7575 include /eigenpy/utils/scalar-name .hpp
7676 include /eigenpy/utils/is-approx.hpp
77+ include /eigenpy/utils/is-aligned.hpp
7778 )
7879
7980SET (${PROJECT_NAME} _SOLVERS_HEADERS
Original file line number Diff line number Diff line change 88#include " eigenpy/fwd.hpp"
99#include " eigenpy/map.hpp"
1010#include " eigenpy/scalar-conversion.hpp"
11-
12- #include < boost/align/is_aligned.hpp>
11+ #include " eigenpy/utils/is-aligned.hpp"
1312
1413namespace eigenpy
1514{
@@ -233,7 +232,7 @@ namespace eigenpy
233232 if (Options != Eigen::Unaligned) // we need to check whether the memory is correctly aligned and composed of a continuous segment
234233 {
235234 void * data_ptr = PyArray_DATA (pyArray);
236- if (!PyArray_ISONESEGMENT (pyArray) || !boost::alignment:: is_aligned (Options, data_ptr))
235+ if (!PyArray_ISONESEGMENT (pyArray) || !is_aligned (data_ptr,Option ))
237236 need_to_allocate |= true ;
238237 }
239238
Original file line number Diff line number Diff line change 1+ //
2+ // Copyright (c) 2020 INRIA
3+ //
4+
5+ #ifndef __eigenpy_utils_is_aligned_hpp__
6+ #define __eigenpy_utils_is_aligned_hpp__
7+
8+ namespace eigenpy
9+ {
10+ inline bool is_aligned (void * ptr, std::size_t alignment)
11+ {
12+ return (reinterpret_cast <std::size_t >(ptr) & (alignment - 1 )) == 0 ;
13+ }
14+ }
15+
16+ #endif
You can’t perform that action at this time.
0 commit comments