Ex A: int Funct1(int x,int y) { // Some Calculation } float Func2(float x, float y) { // some Calculation } double Func3(double x,double y) { /// Performs some different operation } double d = Func1 + func2 + func3 ;
int a; float b; double c; #pragma omp parallel sections { // Run each section in parallel #pragma omp section { a = func1(); } #pragma omp section { b = func2(); } #pragma omp section { c = func3(); } } // We are back in main thread, sum it up double d = a + b + c;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)