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
Disadvantages of IP sec  Tunnelling mode IP sec  tunnelling  mode has the  following  disadvantage a.Encryption of  small  packets  generates a lot  networks  over head  thu

What are the responsibilities of Application Layer? The Application Layer enables the user, whether human or software, to access the network. It gives user interfaces and suppo

The address for a device as it is recognized at the Media Access Control (MAC) layer in the network architecture. MAC address is usually stored in ROM on the network adapter card a

The following information was obtained from a host: IP address...............205.133.127.8/24 Default Gateway...... 205.133.127.1 DNS Server.............139.100.110.10

what are the terms CSU, DSU and TSU?


Q. Explain the Communication Channel Threats? Secrecy Threat - Secrecy is the avoidance of unauthorized information disclosure - Privacy is the guard of individua

what are usages of gogle and internet

- Light source is LED (light-emitting diode) or a laser - LEDs are cheaper however not as precise (unfocused) limited to short-distance use - Lasers is able to have a narrow

Store-and-forward switch  The layer 2 switch accepts a frame on an input line, buffers it briefly, and then routes it to the appropriate output line. Cut-through switch