Skip to content
Snippets Groups Projects
Verified Commit 683b77ca authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: check data alignment

parent 0deef658
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,9 @@ struct EigenAllocator {
PyArrayObject *pyArray,
boost::python::converter::rvalue_from_python_storage<MatType> *storage) {
void *raw_ptr = storage->storage.bytes;
assert(is_aligned(raw_ptr, EIGENPY_DEFAULT_ALIGN_BYTES) &&
"The pointer is not aligned.");
Type *mat_ptr = details::init_matrix_or_array<Type>::run(pyArray, raw_ptr);
Type &mat = *mat_ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment