GNOME Bugzilla – Bug 777452
Add support for OpenMP pragmas using code attributes
Last modified: 2018-05-22 15:43:13 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.
-- 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.