I will use this repo to keep my demos and exercises using OpenMP
Impose order constraints and protect access to shared data.
- High level
- critical - Mutual exclusion. Only one thread at a time can enter a Critical Region
#pragma omp critical
- atomic - provides mutual exclusion but only applies to the read/update of a memory location
#pragma omp atomic
- barrier
- ordered
- critical - Mutual exclusion. Only one thread at a time can enter a Critical Region
- Low level
- flush
- locks (simple and nested)
- SPMD - Single Program Multiple Data is when each thread redundantly executes the same code
- Worksharing - is split up the code between threads
- Loop construct - splits up loop iterations among the threads in a team
#pragma omp for
- Sections/section constructs
- Single construct
- Task construct
- Loop construct - splits up loop iterations among the threads in a team