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
Bridges The bridge function is to attach separate homogeneous networks. Bridges map the Ethernet address of the nodes residing on each network segment and allow only essential

Addresses are necessary for virtually everything we do on the Internet. In TCP/IP the IP is a mechanism for providing addresses for computers on the Internet. Internet addresses ha

Q. Show the Drawbacks of Go-back-N? Drawbacks of Go-back- N - Inefficient - Every out of order received packets are discarded (receiver side is simplified) - This

Overview of Data transmission network model A network is a combination of hardware and software that sends data from one location to another. The hardware consists of the physi

There are three building blocks of client/server a) The client   b) The server and   c)  Middleware.

Measure the performance (both latency and throughput) of  TCP and UDP protocol stack  running on a pair of PCs  or Workstations in the Lab, and compare the results of your software

What is on electronic payment system? Electronic payment systems are alternative cash credit payment methods using several electronic methods to pay for products and services in

It is a basic quantitative property of networks. Delay is a calculate how long it takes for a bit of data to cross across the network from one end to the other. It is calculated in

Can you give an overview of the components in IPSec?

Qustion: Convert the binary number 10111100 to hexadecimal.