What is Data Race ?
A “for” Loop
“for” Loop
for(int i = 0 ; i < 8 ; i++) a[i] = a[i] + b[i];
Execution in Parallel With 2 Threads
Thread 1 a[0] = a[0] + b[0] a[1] = a[1] + b[1] a[2] = a[2] + b[2] a[3] = a[3] + b[3]
Overview to OpenMP
What is OpenMP ?
An API that may be used to explicitly direct multi-threaded, shared memory parallelism.
When to Use OpenMP For Parallelism ?