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
What is WDM? WDM is conceptually the similar as FDM, except that the multiplexing and demultiplexing includes light signals transmitted by fiber optics channel.

Reference models Designing  implementing and  manufacturing  computer  networks  and related  devices  are very  complex  activities. Therefore in order  for this  technolog

Session layer examples are Netbios Names, SQL, NFS, X Windows, and RPC

There is no commonly accepted meaning for a TP monitor. According to Jeri Edwards' a TP Monitor is "an OS for transaction processing".

Drawback of  Repeaters. Repeater  has no filtering capability as it forwards  every frame. Repeater shell  be placed  at accurate distance  before  actual  signal becomes

Q. Calculate Utilization percentage of the link? - System: Stop and wait ARQ - Bandwidth: 1Mbps - Round trip for one bit: 20ms - Frame length: 1000 bits Utilizatio

Question: (a) Describe the importance of backups and the use of antivirus software. (b) With the help of an example/ illustration, explain the term encryption and explain

So how packets do determines their way across the Internet? Does each computer linked to the Internet know where the other computers are? Do packets just get 'broadcast' to every c

Recognize the command that configures serial0 for PPP encapsulation Ans) Router(config-if)# encapsulation ppp

Explain Network Services Network services are the thing that a network can do. The main networking services are File Services: This contains file transfer, storage, data m