Site Tools


scheduling-openmp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
scheduling-openmp [June 11, 2026 at 11:06] Ivan Janevskischeduling-openmp [June 13, 2026 at 03:13] (current) – external edit 127.0.0.1
Line 1: Line 1:
 # Scheduling (OpenMP) # Scheduling (OpenMP)
-**Scheduling** in OpenMP controls how loop iterations are divided among threads. +**Scheduling** in OpenMP controls how loop iterations are divided among threads. By default, `parallel for` splits iterations into roughly equal static chunks assigned to threads upfront. This works well when each iteration takes the same time. When iteration cost varies, static assignment leaves some threads idle while others are still running. A loop where some values of `i` trigger much more work than others is a common example. The `schedule` clause selects the assignment strategy.
- +
-By default, `parallel for` splits iterations into roughly equal static chunks assigned to threads upfront. This works well when each iteration takes the same time. When iteration cost varies, static assignment leaves some threads idle while others are still running. A loop where some values of `i` trigger much more work than others is a common example. The `schedule` clause selects the assignment strategy.+
  
 ```c ```c
scheduling-openmp.1781175993.txt.gz · Last modified: by Ivan Janevski