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
How receiver detects error The frame is 10011101. The generator is 1001. The message after appending the three zeros is 10011101000. The reminder on dividing 10011101000 by 100

State about the international standardization There are many examples, certainly. Some systems for which there is international standardization include compressed disc players

One of the most popular models for designing parallel algorithms is PRAM (Parallel Random Access Machine). A PRAM consists of unbounded number of processors interrelating with each

Advantage of Repeaters Repeaters provide  the  advantage of increasing type size  of LAN or connecting LAN  segments. Repeater can overcome 10  base 5 Ethernet LANM restrictio

This new model of Client/Server having of thin, portable, "universal" clients those talks to super fat servers. In the easiest form, a web server returns documents when clients ask

To use a subnet or classless address, table under routers and hosts that have address must keep two pieces of information with every address: the 32-bit address itself and another

What is the major issue with hop count metric issue

State the uses of groupware With the use of groupware, users can easily do most of the office related management work, which otherwise would be extremely difficult. For instanc

Cisco Express Forwarding CEF is a new method of switching that available in IOS, its overcome the drawbacks of fast switching method In IOS packet switching, There are thre

how to install xp via network