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

Subletting, Ask Design private subnetworks (using Class A range for CIDR) f...

Ask Design private subnetworks (using Class A range for CIDR) for each domain as in the table below, and complete the table. Hints: Consider how many network bits are required to a

What are the disadvantages of star topology, What are the disadvantages of ...

What are the disadvantages of Star Topology? The disadvantages are considered as follows: a. Needs more cable than most topologies. b. Moderately complex to install.

List the advantages of microwaves, List the Advantages of microwaves.  ...

List the Advantages of microwaves.  a. They need no right of way acquisition among towers. b. They can carry high quantities of information because of their high operating f

Direct isp service through leased line, The most expensive method of access...

The most expensive method of accessing the Internet is to employ leased lines that directly connect to the ISP. This will enhance access rate to anywhere between 64 K and 1.5 Mbps,

UDP Programming, I have a larget text file of 1MB, how do i break down into...

I have a larget text file of 1MB, how do i break down into chunks of packets to send over UDP? byte b[]=new byte[1024]; FileInputStream f=new FileInputStream("input.txt

Mechanical characteristics of RS232 interface, Q. Mechanical Characteristic...

Q. Mechanical Characteristics of RS232 interface? - 9-pin connector - 9-pin connector is more usually found in IBM-PC but it covers signals for asynchronous serial com

What is subnetting, Q. What is Subnetting ? Subnetting IP add...

Q. What is Subnetting ? Subnetting IP addressing is hierarchical First reach a device through its network id (netid) Then reach the host itself using the se

What is money laundering and how is money laundered, Question: a) (i)...

Question: a) (i) Describe the entire process of credit card processing, identifying the different steps and parties involved. (ii) What are the roles of the acquiring ban

Snort deployed in the dmz network, Let's consider the network shown in Figu...

Let's consider the network shown in Figure 1 where Snort is deployed. In Figure 1, why is Snort deployed in the DMZ instead of the Internal Network? In Figure 1, say True or

What is source routing, Q. What is Source Routing? Source Routing ...

Q. What is Source Routing? Source Routing - Sender of packet defines bridges and routes that packet should take - Complete path of bridge IDs and destination address i

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