wisconsin
Lecture 11: OpenMP Tasking and Variable Scoping

Lecture 11: OpenMP Tasking and Variable Scoping

Content locked

The catalog is public. Reading this content requires approved access.

Sign in to read
Lecture 11: OpenMP Tasking and Variable Scoping
Announcement and recap
Code of the day: publishing data between threads
Quiz: two independent atomic flags
From loops to a task graph
sections: explicitly written independent blocks
task: work generated at runtime
Linked-list example: preserve each task’s pointer
Waiting for tasks
Quiz: sentence order
depend: express selected ordering edges
Quiz: doubling and incrementing
Variable scoping
Shared temporaries can race even with distinct output indices
Quiz: firstprivate(i) versus private(i)