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 advantages of star topology, What are the advantages of Star T...

What are the advantages of Star Topology? The advantages of star topology are: a. Relatively easy to configure. b. Simple to troubleshoot c. Media faults are automatic

Two commands that copies the configuration in nvram to ram, Recognize the t...

Recognize the two commands that copies the configuration in NVRAM to RAM Ans) a) Copy startup-config running-config b)  Configure memory

Explain persistence timer, Explain Persistence timer? To deal with ...

Explain Persistence timer? To deal with the zero-size windows What if a receiver advertises that the window size is 0 (by sending ACK) and this ACK is lost? - A

Network performance measured by delay and throughput, Q. Network performanc...

Q. Network performance measured by delay and throughput ? delay versus load Delay is composed of? Throughput v/s network load

Network layer of the osi responsible for, What is the Network Layer of the ...

What is the Network Layer of the OSI responsible for? Ans) The Network Layer routes data from single node to another sends data from the source network to the destination networ

What is sockets, A socket is an abstraction that shows an endpoint of commu...

A socket is an abstraction that shows an endpoint of communication. Most applications that consciously use TCP and UDP do so by making a socket of the appropriate type and then per

Design a banking network, You have been asked to design a Banking Network w...

You have been asked to design a Banking Network with two primary types of locations.  Branches that will have 3 subnets, one /25 subnet one /26 subnet for ABMS and one /26 s

Describe wdm, Question 1 Discuss the architecture of new generation networ...

Question 1 Discuss the architecture of new generation networks. Question 2 Explain the functioning of datagram packet switching and virtual circuit packet switching Quest

Explain about stored procedure, A stored procedure is a named collection of...

A stored procedure is a named collection of SQL statements and procedural logic that is compiled, verified and kept in a server database. It is typically treated like any other dat

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