Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for case where no aligned_alloc #559

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

EricaCMitchell
Copy link
Collaborator

Addresses issue #558.

If HAVE_POSIX_MEMALIGN then use posix_memalign over aligned_alloc.

Copy link
Contributor

@evaleev evaleev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EricaCMitchell strictly speaking, this is backwards:

  • we want to prefer standard things to non-standard things, and we want to prefer C++ to C.
  • so std::aligned should be used first. But this means we should check for it in cmake
  • cmake provides no good 1-liner to check for C++ functions reliably so need O(10) lines.

This will work. The notes are for the future. Be OCD.

@evaleev evaleev merged commit 2f1ccaa into m-a-d-n-e-s-s:master Dec 3, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants