sections-openmp
Differences
This shows you the differences between two versions of the page.
| sections-openmp [June 11, 2026 at 09:20] – created - external edit 127.0.0.1 | sections-openmp [June 11, 2026 at 10:03] (current) – Ivan Janevski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| # Sections (OpenMP) | # Sections (OpenMP) | ||
| - | Suppose you have a few independent operations — compress a buffer, encrypt a header, write a log — that share no data and could run simultaneously. A loop doesn' | + | Suppose you have a few independent operations — compress a buffer, encrypt a header, write a log — that share no data and could run simultaneously. A loop doesn' |
| + | |||
| + | **Sections** is the OpenMP construct for this case: it distributes a fixed set of independent code blocks across threads at compile time. Each block is wrapped in `#pragma omp section`. | ||
| ```c | ```c | ||
sections-openmp.txt · Last modified: by Ivan Janevski
