Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

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

Open
olupton opened this issue Jul 5, 2022 · 0 comments
Open

Comments

@olupton
Copy link
Contributor

olupton commented Jul 5, 2022

In #834 we will increase the minimum C++ standard to C++17.

This should allow TODO items like

// Allocate using standard operator new.
// When we have C++17 support then propagate `alignment` here.
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 #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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant