Q. Common syntax of OpenMP?
Every OpenMP directive begins with #pragma omp. The common syntax is
#pragma omp directive-name [Set of clauses]
where omp is an OpenMP keyword. There can be additional clauses (parameters) after directive name for various options.
Now we will discuss about a number of compiler directives in OpenMP.
(i) Parallel Construct
The syntax of parallel construct is in the following manner:
#pragma omp parallel [set of clauses]
Where clause is one of the below clauses:
structured-block
if(scalar-expression)
private(list)
firstprivate(list)
default(shared | none)
shared(list)
copyin(list)