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

Bootrom and memory layout, Memory Memory Layout   BOOT...

Memory Memory Layout   BOOTROM This device stores the information of  the startup diagnostic  code in permanently. It performs diagnostics of  hardware  wh

Source port number - transport layer, Source Port Number This fields o...

Source Port Number This fields occupies  the first 16 bytes of the UDP header. This  fields typically hold the UDP port number  of the application sending  this datagram. The

Itc597, restore the scrambled bits to their original order

restore the scrambled bits to their original order

Write the purpose of split horizon, Split Horizon - If you attain a protoc...

Split Horizon - If you attain a protocol's route on an interface, do not send information about that route back out that interface.

Defining error detection, Problem 1. Explain the term Switching. Descri...

Problem 1. Explain the term Switching. Describe the following Switching Mechanisms a) Circuit Switching b) Packet Switching c) Message Switching Defining Switching

What is meant by asymmetrical protocols, There is a many-to-one relationshi...

There is a many-to-one relationship among clients and server. Clients always start the dialog by requesting a service. Servers are passively awaiting for requests from clients.

Netware protocol provides link-state routing, Which NetWare protocol provid...

Which NetWare protocol provides link-state routing? Ans) NetWare Link Services Protocol (NLSP) gives link-state routing. SAP (Service Advertisement Protocol) advertises network

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