Q. Define syntax of barrier directive?
Barrier Directive
The syntax of barrier directive is
#pragma omp barrier
When a thread attains barrier it waits till all threads have attained the barrier after that they all carry on together. There are limitations on placement of barrier directive in a program. The barrier directive can only be placed in program at a position where deleting or iserting the directive will result in a program with correct syntax.