is-aligned.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020-2023 INRIA
3 //
4 
5 #ifndef __eigenpy_utils_is_aligned_hpp__
6 #define __eigenpy_utils_is_aligned_hpp__
7 
8 namespace eigenpy {
9 inline bool is_aligned(const void* ptr, std::size_t alignment) {
10  return (reinterpret_cast<std::size_t>(ptr) & (alignment - 1)) == 0;
11 }
12 } // namespace eigenpy
13 
14 #endif
bool is_aligned(const void *ptr, std::size_t alignment)
Definition: is-aligned.hpp:9


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26