InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.42k stars 664 forks source link

Add stdexec threading backend #4433

Open thewtex opened 8 months ago

thewtex commented 8 months ago

A new threading backend based on stdexec, which is proposed as the prototype for the new std::execution parallelism model for the C++ standard.

It supports asynchronous execution with scheduler backends based on coroutine thread pools or GPU schedulers, and could be an alternative or basis for #2831.

Description

A new MultiThreader class that that uses stdexec/execution.hpp

Impact analysis

CPU-based parallism could be improved and this could provide GPU parallelism support throughout the toolkit.

Expected behavior

If benchmarking succeeds and support is available across platforms and toolchains, use the new MultiThreader class as the default with the exec/static_thread_pool.hpp. Optionally provided support for NVIDIA GPUs if available.

Versions

Target for ITK 6.

Additional Information

Eventually the header-only library could be vendored in the ITK source tree in ThirdParty/.

thewtex commented 8 months ago

@N-Dekker you might be interested in this :-D