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 are the internal threats - security, What are the Internal Threats ...

What are the Internal Threats Internal security problems are probably the most common. One never knows what someone is going to do. Even the most loyal employees or workers can

Determine the term - backend lan, Determine the term - Backend LAN Back...

Determine the term - Backend LAN Backend networks are used to interconnect large systems like mainframes, supercomputers, and mass storage devices. The key needs here is for bu

Discuss about the similarity of intranets to the internet, Discuss about th...

Discuss about the similarity of Intranets to the Internet The ease of use of the end user would be the most noticeable because of the similarity of Intranets to the Internet. S

What is quantum computing, In quantum computing, we use the method of qubit...

In quantum computing, we use the method of qubits, superposition and coherence. A normal bit can be in only two states - 0 and 1. But a qubit it can be in 0, 1, or in the superposi

What are called fat clients and fat servers, If the amount of the applicati...

If the amount of the application runs on the Client side, then it is Fat clients. It is mostly used for decision support and personal software. If the amount of the application

Comparison and contrast between the osi and tcp-ip model, Q. Comparison and...

Q. Comparison and Contrast between the OSI and TCP-IP Model? This presentation would discuss a few comparison and contrast between the 2 main reference models which use the con

What is ring topology, What is Ring topology The network consists of a ...

What is Ring topology The network consists of a set of repeaters joined by point-to-point links in a closed loop. Each station attaches to the network at a repeater and can tra

Program to reload the router -ccna, Cable, Erase, and Reload the Router ...

Cable, Erase, and Reload the Router Step 1: Cable the network. Cable a network that is same to the one in the topology diagram. Step 2: Clear the configuration on the rou

Calculate link utilisation - exchanging packets, a)  Assume that the time r...

a)  Assume that the time required to transmit one packet (i.e. the packet length divided by link data rate) is 10ms and the Round Trip Time (from Source to Destination and back) is

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