Construct with private and firstprivate clauses, Computer Networking

Assignment Help:

In this example we will see the use of parallel construct with private and firstprivate clauses. At the end of the program i and j remain undefined as these are private to thread in parallel construct.

#include

int main()

{

int i, j;

i = 1;

j = 2;

#pragma omp parallel private(i) firstprivate(j)

{

i = 3;

j = j + 2;

}

printf("%d %d\n", i, j); /* i and j are undefined */

return 0;

}

In the following example, each thread in the parallel region decides what part of the global array x to work on, based on the thread number.


Related Discussions:- Construct with private and firstprivate clauses

Asynchronous or statistical time division multiplexing, Asynchronous or Sta...

Asynchronous or Statistical Time Division Multiplexing As we  have seen  synchronous  TDM does not  guarantee that the full capacity of a link in sued. In fact it is more like

What is explicit congestion signalling, What is Explicit congestion signall...

What is Explicit congestion signalling In general way, for explicit congestion avoidance, the network alerts end systems to growing congestion within the network and the end sy

Write down short note on frame-relay dlci, DLCI- Data Link Connection Iden...

DLCI- Data Link Connection Identifier. A frame-relay service provider usually assigns DLCI values that are used by frame-relay to distinguish among different virtual circuits on th

Define ring topology, Q. Define Ring Topology?  Dedicated point-to-poi...

Q. Define Ring Topology?  Dedicated point-to-point arrangement to neighbours  Signal is conceded from device to device until it reaches destination  Every device functio

What is a transaction server, What is a Transaction server? With a tran...

What is a Transaction server? With a transaction server, the client includes remote procedures that reside on the server with an SQL database engine. These remote processes on

Reference models - fundamentals of networks, Reference models Design...

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

Discuss the architecture and applications of e-mail, Question 1 Discuss th...

Question 1 Discuss the following Switching Mechanisms- Circuit switching Message switching Packet switching   Question 2 Discuss the following IEEE standard

Binary addition, using binary adition, what is the result of 1010 + 10? Usi...

using binary adition, what is the result of 1010 + 10? Using binary addition, how would you repeatedly increment a number by 2?

The internet layer - fundamentals of networks, The Internet Layer The ...

The Internet Layer The  internet  layer is  responsible  for routing the data  packets  to the appropriate  destination. Internet protocol (IP) is responsible for ensuring dat

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