spcl / dace

DaCe - Data Centric Parallel Programming
http://dace.is/fast
BSD 3-Clause "New" or "Revised" License
499 stars 129 forks source link

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

Closed ThrudPrimrose closed 3 days ago

ThrudPrimrose commented 1 week ago

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 commented 1 week ago

In which c++ standard was this added?

tbennun commented 1 week ago

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

ThrudPrimrose commented 1 week ago

In which c++ standard was this added?

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

ThrudPrimrose commented 1 week ago

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 commented 1 week ago

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