Skip to content

marcelarosalesj-education/other.openmp-excercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

OpenMP exercises

I will use this repo to keep my demos and exercises using OpenMP

Synchronization

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
  • Low level
    • flush
    • locks (simple and nested)

SPMD vs Worksharing

  • 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

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published