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

Instead of compiler specific align hint use C++ standard aligned alloc #1744

Closed
wants to merge 4 commits into from

Conversation

ThrudPrimrose
Copy link
Collaborator

We can use alignas, std::aligned_alloc and std::free that are in the C++ standard instead of using DACE_ALIGN + delete[] which are compiler specific. Even though both Clang, GCC support this extension...

@tbennun
Copy link
Collaborator

tbennun commented Nov 9, 2024

In which c++ standard was this added?

@tbennun
Copy link
Collaborator

tbennun commented Nov 9, 2024

Also please remember that we are trying to generate as much C99 as possible. We only use C++ if we must

@ThrudPrimrose
Copy link
Collaborator Author

In which c++ standard was this added?

C11, and since it is in C standard library, C++ gets it too

@ThrudPrimrose
Copy link
Collaborator Author

Also please remember that we are trying to generate as much C99 as possible. We only use C++ if we must

Is there a specific reason for C99?
We already use C++11 features like std::mutex and std::atomics.

@tbennun
Copy link
Collaborator

tbennun commented Nov 9, 2024

Also please remember that we are trying to generate as much C99 as possible. We only use C++ if we must

Is there a specific reason for C99? We already use C++11 features like std::mutex and std::atomics.

Only because we have to and not on device code

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