6 ms·
Having looked briefly at the code I still think C++17 parallel algorithms are more ergonomic compared to OpenMP: https://rocm.blogs.amd.com/software-tools-optim
by mathiasgredal 2y ago
Having looked briefly at the code I still think C++17 parallel algorithms are more ergonomic compared to OpenMP: https://rocm.blogs.amd.com/software-tools-optimization/hipstdpar/README.html https://rocm.blogs.amd.com/software-tools-optimization/hipst...
- mgaunard 2y agofunny how we only get LoC between the different versions, but not the performance... Of course the parallel algorithms are shorter, it's a more high-level interface. But being explicit gives you more control and potentially more performance.
- bee_rider 2y agoIs language support why people like OpenMP? I think it is nice because it supports both C and Fortran, and they use the same runtime, so you can do things like pin threads to cores or avoid oversubscription. Stuff like calling a Fortran library that uses OpenMP, from a C code that also uses OpenMP, doesn’t require anything clever.
- jltsiren 2y agoOpenMP has been around for a long time. People know how to use it, and it has gained many features that are useful for scientific computing. The consortium behind OpenMP consists mostly of hardware companies and organizations doing scientific computing. Software companies are largely missing. That may contribute to the popularity of OpenMP, as the interests of scientific computing and software development are often different.
- phkahler 2y ago>> Is language support why people like OpenMP? I use it sometimes with C++ because it is super easy to make "embarrassingly parallel" code actually run in parallel. And by using nothing but #pragma statements it will still compile single threaded if you don't have OMP as the pragmas will be ignored.