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

Replace posix_memalign with std::aligned_alloc #859

Merged
merged 2 commits into from
Sep 19, 2022
Merged

Conversation

ohm314
Copy link
Contributor

@ohm314 ohm314 commented Sep 16, 2022

Unfortunately aligned_alloc does not allow aligning buffers that are not a multiple of the alignment. To help with this we allocate slightly larger buffers where necessary.

Description

Updates alloc_memory and nrn_cacheline_alloc to use std::aligned_alloc instead the POSIX memalign.

Fixes (partially) #836

Use certain branches in CI pipelines.

CI_BRANCHES:NEURON_BRANCH=master,NMODL_BRANCH=master,SPACK_BRANCH=develop

Omar Awile added 2 commits September 16, 2022 16:44
Unfortunately aligned_alloc does not allow aligning buffers that are not
a multiple of the alignment. To help with this we allocate slightly
larger buffers where necessary.
@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #74689 (:white_check_mark:) have been uploaded here!

Status and direct links:

@ohm314 ohm314 merged commit 414479d into master Sep 19, 2022
@ohm314 ohm314 deleted the ohm314/aligned_alloc branch September 19, 2022 09:36
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
)

* Replace posix_memalign with std::aligned_alloc

Unfortunately aligned_alloc does not allow aligning buffers that are not
a multiple of the alignment. To help with this, we allocate slightly
larger buffers (up to the next multiple of the alignment) where necessary.

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@414479d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants