Master construct program in parallel construct, Computer Networking

master construct

#include

extern float average(float,float,float);

void master_construct ( float* x, float* xold, int n, float tol )

 {

int c, i, toobig;

float error, y;

c = 0;

#pragma omp parallel

{

do{

#pragma omp for private(i)

for( i = 1; i < n-1; ++i ){

xold[i] = x[i];

}

#pragma omp single

{

toobig = 0;

}

#pragma omp for private(i,y,error) reduction(+:toobig)

for( i = 1; i < n-1; ++i ){

y = x[i];

x[i] = average( xold[i-1], x[i], xold[i+1] );

error = y - x[i];

if( error > tol || error < -tol ) ++toobig;

}

#pragma omp master

{

++c;

printf( "iteration %d, toobig=%d\n", c, toobig );

}

}while( toobig > 0 );

}

}

Posted Date: 3/4/2013 5:24:34 AM | Location : United States







Related Discussions:- Master construct program in parallel construct, Assignment Help, Ask Question on Master construct program in parallel construct, Get Answer, Expert's Help, Master construct program in parallel construct Discussions

Write discussion on Master construct program in parallel construct
Your posts are moderated
Related Questions
Process Management int pvm_mytid( void ) Returns the tid of the calling process.  tid values less than zero indicate an fault. int pvm_exit( void ) T

system files

In this question, we study Nested ESP in AH, that is, we combine ESP with AH. Let's look at the site-to-site VPN scenario shown again in Figure 1. Let's assume that Alice's desktop

where can i find some informations about the subject and the assignment is called Clotilde manufacturing group

do you do paraphrase

What is the difference between a JDK and a JVM? JDK is Java Development Kit which is for development purpose and it contains execution environment also. But JVM is purely a


What is Groupware Groupware are a collection of software tools that encompass a broad range of applications. Even though groupware broadly consists of applications like calend

What is the function of the OSI Session Layer? This layer gives the protocols and means for two devices on the network to communicate with each other by holding a session.  Thi

The diagram below offers an overall view on the methods use by both the OSI and TCP/IP model. ISO Approach - Occasionally called Horizontal Approach - OSI asse