sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Core] STL parallelism support

Open alxbilger opened this issue 2 years ago • 5 comments

Introduce flags to know if STL parallelism is supported (see https://github.com/sofa-framework/BeamAdapter/pull/50), and an example on how to use it.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

alxbilger avatar Oct 03 '22 16:10 alxbilger

Thanks for the interesting PR.

It is unclear to me why using macros. It was thinking that these features are c++17 and we agreed sofa to on its way to c++20.

damienmarchal avatar Oct 03 '22 16:10 damienmarchal

Thanks for the interesting PR.

It is unclear to me why using macros. It was thinking that these features are c++17 and we agreed sofa to on its way to c++20.

For the moment, even if a compiler/std lib supports c++17, it does not mean for sure it supports stl parallelism unfortunately. I dont remember which one but one of the compiler of our "base" OSes on the CI did not support it. (mac clang or ubuntu gcc)

fredroy avatar Oct 04 '22 00:10 fredroy

[ci-build][with-all-tests]

alxbilger avatar Oct 04 '22 10:10 alxbilger

An alternative is to support only compilers supporting parallel algorithms

alxbilger avatar Oct 05 '22 08:10 alxbilger

Giving more info: it was not supported for Ubuntu2004 while I implemented this feature in BeamAdapter

https://github.com/sofa-framework/BeamAdapter/actions/runs/2880398323 (no more logs unfortunately)

fredroy avatar Oct 12 '22 00:10 fredroy

Postponed until support of Ubuntu 20.04 is dropped

alxbilger avatar Oct 19 '22 09:10 alxbilger