Master construct program in parallel construct, Computer Networking

Assignment Help:

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 );

}

}


Related Discussions:- Master construct program in parallel construct

Enumerate about the server modules, Enumerate about the server modules ...

Enumerate about the server modules WebDAV is one of the best-used server modules and many companies developing Intranet software or groupware as well as various publishing and

Illustrate 802.11 csma, 802.11 CSMA/CA a) Wait a DIFS time to avoid col...

802.11 CSMA/CA a) Wait a DIFS time to avoid collision b) Send RTS and wait for CTS reply to obtain the use of the Medium (air) c)  Use of SIFS time for control informatio

Hub - network layer and routing , Hub A hub  is a  small box that  con...

Hub A hub  is a  small box that  connects  individual devices on network  so that  these devices  can  communicate  with each  other. Hub  is an inexpensive device. It is comm

Mips instruction - set and explain the restrict pipelining, 1.  Consider th...

1.  Consider these two potential additions to the MIPS instruction set and explain how they would restrict pipelining. a)  cp d1(r1), d2(r2) copy contents of word at address

Routing protocol used in design a banking network, You have been asked to d...

You have been asked to design a Banking Network with two primary types of locations.  Branches that will have 3 subnets, one /25 subnet one /26 subnet for ABMS and one /26 s

Explain the architecture and usage of isdn, Computer Networks 1. Write ...

Computer Networks 1. Write about different network structures in use. 2. Explain the architecture and usage of ISDN. 3. Describe the concept of framing in Data Link Layer

Define what is the mac address, When you move the NIC cards from one PC to ...

When you move the NIC cards from one PC to another PC, does the MAC address gets transferred as well? Yes, that's because MAC addresses are hard-wired into the NIC circuitry, n

Assignment help, Hello there i have an assignment in Data communication an...

Hello there i have an assignment in Data communication and networks. I have done most of the assignment but i am stuck in one part which is designing a network in a university cam

State the security concerns, State the Security concerns The history of...

State the Security concerns The history of security concerns is not new. They have been of great worry to man and for many centuries man has been endeavouring to devise new tec

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd