❌ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayAda Forum - Latest topics

Lightweight Parallelism library based on Ada 2022 features

By: sttaft
4 November 2023 at 13:46

A full implementation of the parallel features of Ada 2022 is yet to be released. In the meantime, here is a light-weight-threading library that provides essentially all of the parallel features of Ada 2022, using various generics, etc. Scheduling is provided using a plug-in architecture. If no scheduler is plugged in, the light-weight threads are simply executed sequentially. If a light-weight-thread scheduler is plugged in, then the light-weight threads spawned by instances of the various generic packages are managed by that scheduler.

There are currently two LWT scheduler plug-ins:

  • a wrapper for the GNU implementation of OpenMP (lwt-openmp.ads)
  • a work-stealing based plug-in, written entirely in Ada (lwt-work_stealing.ads)

Below is a link to the β€œreadme.md” documentation for the GitHub lwt library. It is currently part of the ParaSail GitHub repository, but the files in β€œlwt” are actually independent of ParaSail. ParaSail has its own work-stealing-based scheduler built-in, but at some point we plan to shift over to using the β€œlwt” library. But at the moment, there is no dependence either way between the ParaSail interpreter/compiler and the lwt library.

Feel free to open GitHub Issues if you find problems with the implementation, or have suggestions for improvements.

Enjoy!

-Tucker Taft

The ParaSail GitHub repository was created by my colleague Olivier Henley, and he has also helped to improve the documentation and testing scripts. Much appreciated!

2 posts - 2 participants

Read full topic

❌
❌