Optimisation, Distribution and Parallelisation
An OpenMP Example in C: Notes
- #pragma identifies compiler directive
- Different threads can do different things
- Helper functions get thread id and number of threads
- n_threads and thread_id are private variables
- Scope of parallel region is defined by {...} after the
#pragma omp parallel
- Outside parallel region code runs on one thread