Q. Explain use of parallel sections construct?
This illustration explains use of parallel sections construct. Three functions, fun1, fun2, and fun3, all can be executed simultaneously. Note that all section directives require appearing in parallel sections construct.
void fun1();
void fun2();
void fun3();
void parallel_sec()
{
#pragma omp parallel sections
{
#pragma omp section
fun1();
#pragma omp section
fun2();
#pragma omp section
fun3();
}
}