Metadata-Version: 2.3
Name: openmpy
Version: 0.1.0
Summary: A native implementation of OpenMP in Python.
Author: Dorian OUAKLI
Author-email: dorian.ouakli@xwiki.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown

# Native OpenMP for Python
This library is a native OpenMP implementation in python.

The `barrier`, `critical`, `for`, `parallel`, `parallel for` and `single` directives are supported,
as well as the `reduction`, `private`, `schedule` and `nowait` clauses.

Here is an example program that uses the library.

```python
#!/usr/bin/env python3
import omp
from omp import OpenMP

from functools import reduce

N = 20


@omp.enable
def main():
    acc = 0
    acc2 = 1
    with OpenMP("parallel"):
        with OpenMP("for reduction(+:acc) reduction(*:acc2)"):
            for i in range(1, N):
                acc += i
                acc2 *= i
    print("Actual result:", acc, acc2)
    print("Expected result:", sum(range(1, N)), reduce((lambda a, b: a*b), range(1, N), 1))


if __name__ == '__main__':
    main()
```

<!-- See `examples` for example usages of the library. ->>

