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

Explain about congestion control, Q. Explain about Congestion control? ...

Q. Explain about Congestion control? Congestion control Open-loop congestion control - prevent congestion before it happens retransmission policy - Ret

Latency and scalability, Latency : In interconnection networks a variety of...

Latency : In interconnection networks a variety of nodes may be at dissimilar distances depending upon the topology. The network latency differs to the worst-case time wait for a u

Method of ip multicasting or multicast ip address, Can you describe the con...

Can you describe the concept of IP multicasting or multicast IP address?

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

How to prepare the network- ccna, Prepare the Network Cable a network ...

Prepare the Network Cable a network that is similar to the one in the topology diagram.  You can use any current switch in your lab as long as it has the needed interfaces

Improvements for the wireline lan infrastructure, 5. CSMA/CD based Ethernet...

5. CSMA/CD based Ethernet LANs in various sites and Frame Relay (FR) service to connect them together. You want to make a difference in the organization by upgrading the LANs to be

Determine about the internet, Determine about the Internet The I...

Determine about the Internet The Internet as a source of information and reference material, browsing the World Wide Web (WWW) and Newsgroups for the latest gossip or sh

Private network, Single company or organization owns this. They are usually...

Single company or organization owns this. They are usually LAN technologies. There can be multiple LANs in a campus or building linked together. They are sometimes known Intranet.

Define in details about computer networks, Define in details about compute...

Define in details about computer networks ? Discuss a variety of types of networks topologies in computer network. Also discuss a variety of costs and disadvantage of all topology

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