After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777452 - Add support for OpenMP pragmas using code attributes
Add support for OpenMP pragmas using code attributes
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-18 15:02 UTC by adria.arrufat
Modified: 2018-05-22 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description adria.arrufat 2017-01-18 15:02:14 UTC
As discussed on IRC, it would be an interesting addition for Vala to support some OpenMP directives in order to be able to parallellise simple loops.

One should be able to put
[CCode (openmp = "#pragma omp parallel for")] or 
[CCode (pragma = "omp parallel for")] or 
[OpenMP (pragma = "parallel for")] for instance,
immediately before a for loop in Vala, and the code generator would just have to place
#pragma omp parallel for
before the loop in C.

Then, one should build with -X -fopenmp to enable OpenMP (very much like -X -lm when using Math)

That would be an easy way for developers using Vala to parallelise their for loops without worrying about threads.

Maybe if the idea takes of, more advanced features for OpenMP could be supported.

Thanks in advance.
Comment 1 GNOME Infrastructure Team 2018-05-22 15:43:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/571.