OpenMP-like constructs for Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

PyOMP Usage Documentation



Import PyOMP module
from omp import Omp

From this point onwards, till the end, a block of code refers to a function with the code inside it. This function shall not take any arguments unless its explicitly specified.
Use the parallel directive to start a parallel block.

To parallelize a for loop, use the for directive. The function on which this directive (or decorator) is applied takes a list as an arugment, and the for loop must iterate through this

There is also ssupport for a single block and task blocks within
@Single @Task

Sections are created in the same way. With an outer block decorated with "sections" and containing blocks of "section"s within
@Sections @Section

A sample file is made available. Check


Benchmarks of a matrix-matrix show that the performance is twice as better. (Lower is better). Benchmark