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 the following: cdma and fdma, Question 1 Explain GSM digital cellu...

Question 1 Explain GSM digital cellular System model Question 2 Explain cellular Digital Packet Data(CDPD) system with the help of CDPD network reference model Question 3

Wait protocol in parallel programming , Wait protocol The wait protoco...

Wait protocol The wait protocol is used for resolving the conflicts, which arise due to number of multiprocessors demanding the same resource. There are two types of wait prot

Long term evolution and network requirements-ethernet , You are a network c...

You are a network consultant working for a large European networVservice provider and have been given the task of reviewing the future network requirements of the company for its f

What is network virtual terminal, What is NVT (Network Virtual Terminal) ...

What is NVT (Network Virtual Terminal) It is a set of rules explaining a very simple virtual terminal interaction. The NVT is used in the begin of a Telnet session.

What is icmp, What is ICMP? ICMP is Internet Control Message Protocol. ...

What is ICMP? ICMP is Internet Control Message Protocol. It gives messaging and communication for protocols within the TCP/IP stacks. This is also the protocol that manages err

Wideband digital cross connects, Wideband Digital Cross Connects A SONE...

Wideband Digital Cross Connects A SONET  cross  connect  accepts  various  optical  carries  rates accesses the  STS signals  and switches at this level . it  is idally used at

Reduction of out of band radiation in ofdm system, THE high spectral effici...

THE high spectral efficiency makes OFDM a suitable technology to meet the demands of wireless data traffic. A currently discussed new application are OFDM based overlay systems. In

What is client/server, Clients and Servers are dividing logical entities th...

Clients and Servers are dividing logical entities that work together over a network to accomplish a task. Many systems with very dissimilar architectures that are connected togethe

Private networks, Private  Networks The information routes from one ne...

Private  Networks The information routes from one networks  to another  network through  a leased line. If an  organization needs privacy  can use a private networks  or networ

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