java-romp / jromp

Java Runtime implementation of OpenMP.
https://java-romp.github.io/jromp/
MIT License
5 stars 0 forks source link

Add support for `atomic` construct #9

Closed scastd closed 3 months ago

scastd commented 3 months ago

Describe the feature

The atomic construct has the following properties:

Full OpenMP specification (link).

C code example:

int x=1;

#pragma omp parallel num_threads(2)
{
  #pragma omp atomic
  x++; // only 1 thread at a time updates x here
}

printf("%d", x); // prints 3

Additional information

Final checks