is-aligned.hpp
Go to the documentation of this file.
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
bool is_aligned(void *ptr, std::size_t alignment)
Definition: is-aligned.hpp:10


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59