Construct with private and firstprivate clauses, Computer Networking

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.


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.

Posted Date: 3/4/2013 5:20:35 AM | Location : United States

Related Discussions:- Construct with private and firstprivate clauses, Assignment Help, Ask Question on Construct with private and firstprivate clauses, Get Answer, Expert's Help, Construct with private and firstprivate clauses Discussions

Write discussion on Construct with private and firstprivate clauses
Your posts are moderated
Related Questions
CONNECTION-ORIENTED: Accounting is simpler. Application can learn of network causes immediately. CONNECTIONLESS: It has fewer load. It is easier to cre

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

Discuss about LAN topologies LAN topologies:   Network topology is a physical schematic that demonstrates interconnection of the many users. There are four fundamental topolog

How Does Network Topology Affect The Cost And Network Performance, Computer Science.

What is the difference between CSMA/CD and CSMA/CA? CSMA/CD, or Collision Detect, retransmits data frames when a collision occurred. CSMA/CA, or Collision Avoidance, will first

Configure Router1. From Host1, connect to the console of Router 1 and establish a console session. Directions for creating a console connection using HyperTerminal are in Appen

what is gateway?

SONET SDH To satisfy the  requirements  of ever increasing data rate  for diverse applications, ANS developed  a standard known as synchronous optical  network by utili

FAULT TREE ANALYSIS Reliability engineering, in a nutshell is concerned with failures.   How failures occur, how often they occur, and how to minimize them are the basic proble