Parallel construct in openmp, Computer Networking

Assignment Help:

Parallel Construct

The syntax of the parallel construct is as follows:

#pragma omp parallel [set of clauses]

 where clause is one of the following:

 structured-block

if(scalar-expression)

private(list)

firstprivate(list)

default(shared | none)

 shared(list)

 copyin(list)

When a thread encounters a parallel construct, a set of new threads is created to implement the parallel region. Within a parallel region every thread has a unique thread number. Thread number of the master thread is zero. Thread number of a thread can be getting by the call of library function omp_get_thread_num. Now, we are giving the explanation of the clauses used in a parallel construct.

(a) Private Clause:

These clauses states one or more list items to be private to a thread. The syntax of the private clause is

 private(list).

(b) Firstprivate Clause:

The firstprivate clause states one or more list items to be private to a thread, and initializes each of them with the value that the corresponding original item has when the construct is encountered. The syntax of the firstprivate clause is as follows:

 firstprivate(list).

(c) Shared Clause:

The shared clause declares one or more list items to be shared between all the threads in a team. The syntax of the shared clause is :

 shared(list)

(d) Copyin Clause:

The copyin clause gives a mechanism to copy the value of the master thread's threadprivate variable to the threadprivate variable of each other member of the team implementing the parallel region. The syntax of the copyin clause is :

 copyin(list)


Related Discussions:- Parallel construct in openmp

What is bit stuffing, What is Bit Stuffing? Bit stuffing is the process...

What is Bit Stuffing? Bit stuffing is the process of adding one extra 0 whenever five consecutive is follow a 0 in the data, so that the receiver does not mistake the pattern 0

Distributed systems, There are two dominant forms of building distributed s...

There are two dominant forms of building distributed systems: client-server systems, i.e. systems in which one machine acts as a server and act as clients; and peer-to-peer systems

Illustrate 802.11b HR DSSS, 802.11b HR DSSS a) High-rate DSSS using a ...

802.11b HR DSSS a) High-rate DSSS using a 2.4 GHz band b) Similar to DSSS excluding for encoding method c) Uses complementary code keying (CCK), encoding 4 or 8 bits to

Explain multipoint connection, Explain multipoint connection. A multipo...

Explain multipoint connection. A multipoint connection is a link among three or more devices. Historically, multipoint connections were used to attach central CPs to distribute

Classless addressing over classfull addressing scheme, What is the benefit ...

What is the benefit of using classless addressing over classfull addressing scheme?

Describe about the noiseless channel, Describe about the noiseless channel ...

Describe about the noiseless channel A noiseless channel can transmit an arbitrarily large amount of information, no matter how frequently it is sampled. Just send a lot of dat

#incident response scenario, assignment is for incident response In this ...

assignment is for incident response In this final week, you will provide a short procedures document (2–3 pages) concerning the steps by which to prepare for and execute expert te

What is an arp and how does it work, ARP(ADDRESS RESOLUTION PROTOCOL) is a ...

ARP(ADDRESS RESOLUTION PROTOCOL) is a network layer protocol which associates the physical hardware address of a network node(commonly called as a MAC ADDRESS) to its ip address. n

What is ping, What is Ping? Ping is a utility program that permits you ...

What is Ping? Ping is a utility program that permits you to check connectivity among network devices on the network. You can ping a device by using its IP address or device nam

Bens network, Bens Network  Ben's network is a non-blocking network. ...

Bens Network  Ben's network is a non-blocking network.  It is a different  type of Clos network where initial and final stage consists of  2×2 switches (for n input  and m ou

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