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

What rate rtcp will limit, Consider an RTP session consisting of five users...

Consider an RTP session consisting of five users, all of which are sending and receiving RTP packets into the same multicast address. Each user sends video at 200kbps. a)  What

State ethernet frame format, Ethernet Frame Format Consists of sev...

Ethernet Frame Format Consists of seven fields There is No mechanism for acknowledging received frames considered an unreliable medium

Give the solutions to the threats, Give the solutions to the threats In...

Give the solutions to the threats In order to implement solutions to the threats, it is advisable that the company should maintain proper password protected hardware. Wherever

The size of a broadcast domain, Which switching technology can decrease the...

Which switching technology can decrease the size of a broadcast domain? Ans) VLAN's are logical ways to break up a huge broadcast domain. To get from VLAN to VLAN you must ha

What is intranet security, What is Intranet security Every company star...

What is Intranet security Every company starts its operations with a genuine and honest thinking. As time passes, based on the needs of its employees as well as customers, a nu

Determine the characteristics of thicknet, Thicknet Characteristics ...

Thicknet Characteristics It Supports transmission rates up to 10 Mbps in Baseband mode Less expensive in comparison of fiber-optic cable however more expensive than ot

Determine the rate of communication line, Determine the rate of communicati...

Determine the rate of communication line The dog could carry 21 gigabytes or 168 gigabits. A speed of 18 km/hour that is equal to 0.005 km/sec. The time to travel the distance

Authentication mechanism in vpn, What are the dissimilar ways authenticatio...

What are the dissimilar ways authentication mechanism in VPN?

Differentiate between ipv4 and ipv6, Question 1 Write short notes on Re...

Question 1 Write short notes on Reserved IP addresses and Special use IP addresses 2 Explain about the packet switching mechanism based on Virtual Circuit 3 Explain about

Networking assignment, Suppose a small company wants to develop a computer ...

Suppose a small company wants to develop a computer network of 18 computers in its main office. Due to limited resources the company wants a network architecture where a single com

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