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

numa() changes #20

Merged
merged 2 commits into from
Jun 15, 2021
Merged

numa() changes #20

merged 2 commits into from
Jun 15, 2021

Conversation

angainor
Copy link
Collaborator

add numa().local_node (preferred_node does not behave as expected), address #19
make get_node(void *ptr) public

bool can_allocate_on(index_type node) const noexcept;
allocation allocate(size_type num_pages) const noexcept;
allocation allocate(size_type num_pages, index_type node) const noexcept;
allocation allocate_malloc(size_type num_pages) const noexcept;
void free(allocation const& a) const noexcept;
index_type get_node(void* ptr) const noexcept;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a use-case for making this part or the public API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boeschf I used it in my test to see if the allocation is correct. Not sure if it will be useful in applications, but I don't see any reasons to hide it either ;)

https://github.com/angainor/hwmalloc/blob/test_omp/test/test_omp.cpp

Copy link
Collaborator

Choose a reason for hiding this comment

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

true, ok let's leave it there then

@boeschf
Copy link
Collaborator

boeschf commented Jun 14, 2021

Can you use clang-format before pushing? I haven't yet added format-checking to this repo.

@boeschf
Copy link
Collaborator

boeschf commented Jun 14, 2021

Otherwise, local_node() seems to be useful on its own right, I like it.

@boeschf
Copy link
Collaborator

boeschf commented Jun 14, 2021

see my comment on issue #19 - maybe this is the reason for the preferred node always being 0.

@boeschf boeschf merged commit 7676ed6 into ghex-org:master Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants