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

Command to show the hardware platform information, Recognize the command to...

Recognize the command to show the hardware platform information Ans) Show version is the command to show the hardware platform information

On which languages intranet works, On which languages Intranet works ...

On which languages Intranet works Language Support The Intranet works on the basis of scripts written in any of the following languages, viz., SGML, HTML, DHTML, XML, AS

Iso - organization for standardization, - The ISO (International Organisati...

- The ISO (International Organisation for Standardisation) is an International standards organisation responsible for a wide range of standards including many that are relevant to

Hierarchy of dns servers application layer , Hierarchy of DNS Servers ...

Hierarchy of DNS Servers DNS uses a large number of server organized in hierarchical  fashion  and distribution  around the world. No single DNS server has all  of the  mappin

Describe briefly how the news filtering agent works, QUESTION (a) Conce...

QUESTION (a) Concerning agents that reduce workload, there are four agents developed using a learning approach among which is the News Filtering Agent. Name the other three age

What is region, What is region? When hierarchical routing is used, the ...

What is region? When hierarchical routing is used, the routers are separated into what we will call regions, with every router knowing all the details about how to route packet

Concept of connection between the pc and the cable modem, Concept of connec...

Concept of connection between the PC and the cable modem Even if downstream channel works at 27 Mbps, user interface is nearly always 10-Mbps Ethernet. There is no way to get b

Error correction - retransmission, When an error is discovered the receiver...

When an error is discovered the receiver is able to ask the sender to retransmit the entire data unit Error Correction-Forward Error Correction A receiver is able to u

Multi tasking environment, Multi Tasking Environment Multi tasking exp...

Multi Tasking Environment Multi tasking exploits parallelism by: 1)  Concurrently using the multiple functional units 2)  Pipelining functional units are pipe line toget

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