CoreNeuron icon indicating copy to clipboard operation
CoreNeuron copied to clipboard

C++17: take advantage of overaligned operator new and aligned_alloc

Open olupton opened this issue 3 years ago • 0 comments

In https://github.com/BlueBrain/CoreNeuron/pull/834 we will increase the minimum C++ standard to C++17.

This should allow TODO items like https://github.com/BlueBrain/CoreNeuron/blob/0574812f772d6dde595f33913452f798bba5166e/coreneuron/utils/memory.cpp#L39-L40 to be addressed. This should be helpful (also in NEURON) for structures that should be allocated overaligned (e.g. for SSE/AVX).

An initial attempt at addressing this was introduced in https://github.com/BlueBrain/CoreNeuron/pull/834, but then removed again. Check the intermediate versions of that PR.

We can also use std::aligned_alloc instead of posix_memalign, and so on.

olupton avatar Jul 05 '22 08:07 olupton