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

Tcp – numbering bytes, Q. TCP – numbering bytes? Numbering is utili...

Q. TCP – numbering bytes? Numbering is utilized for flow & error control Segments aren't numbered only bytes Full-duplex connection - numbering is independent in

Give the types of firewalls, Give the types of firewalls Conceptually,...

Give the types of firewalls Conceptually, there are two types of firewalls: 1.  Network Level 2.  Application Level Network Level Firewall/Packet Filters The Net

Command to configure a explanation on an interface, Recognize the command t...

Recognize the command to configure a explanation on an interface Ans) Router(config-if)# explanation Finance department

What are the various security measures, What are the various security meas...

What are the various security measures A matter of prime concern to companies is the overheads in the form of huge investment on extra hardware and software. It is quite possi

What is the virtual path, Along any transmission path from a given source t...

Along any transmission path from a given source to a given destination, a group of virtual circuits can be grouped together into what is known as path.

Cidr presentation, Inside a device, every address mask is stored as a 32-bi...

Inside a device, every address mask is stored as a 32-bit number. When we submit a prefix and an address mask they use a changed form of dotted decimal addressing known CIDR addres

Categories of encryption - decryption, Q. Categories of Encryption - Decryp...

Q. Categories of Encryption - Decryption ? Categories of Encryption/Decryption - Symmetric-key - encryption key (Ke) and the decryption key (Kd) are the same and secret

Determine about the complete and proper security, Determine about the Compl...

Determine about the Complete and proper security Complete and proper security configuration and administration is indeed a complex issue. One should think carefully about the

Time out - transport layer, Time out The  protocols  name Go Back  N i...

Time out The  protocols  name Go Back  N is  derived  from the  sender behaviour in the  presence  of lost or  overly  delayed packets. A timer will again  be used  to recover

Retransmission of packets - transport layer, Retransmission of packets ...

Retransmission of packets The disadvantage  of thronging away a correctly received packet is that  the subsequent retransmission  of the  packet might  be lost  or garbled and

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