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

Data alignment in processor arrangements, Data Alignment Arrays are ali...

Data Alignment Arrays are aligned to templates by the ALIGN directive. The ALIGN directive is used to align elements of different arrays with each other, indicating that they s

How lans connected to internet, How LANs connected to Internet. Doublin...

How LANs connected to Internet. Doubling every 18 months means factor of four gains in 3 years. In 9 years, gain is then 43 or 64, which leads to 6.4 billion hosts. My intuitio

Link layer process, Each link layer process will have two connections: one ...

Each link layer process will have two connections: one "up" to the appropriate IP layer process, and one "sideways" to the link layer process on the simulated machine at the other

Tcp connections - transport layer, TCP Connections TCP  is an end to e...

TCP Connections TCP  is an end to end point to point  transport  used in internet. being a point  to point  protocols  means that  there is always  s single  sender  a single

Explain the layer which is closer to the user, There is only an applicatio...

There is only an application layer which is closer to user and also gives many application which user directly linked.for ex:- web browser

Addresses and connection identifiers, Address is a full unique identifier. ...

Address is a full unique identifier. Connectionless delivery needs address on every packet. Connection-oriented delivery may use a short hand that shows the connection rather th

What is meant by asymmetric multiprocessing, What is meant by Asymmetric Mu...

What is meant by Asymmetric Multiprocessing (AMP)? It imposes hierarchy and a division of labor between processors. Only one designated processor, the master, controls (in a ti

Categories of encryption - decryption, Q. Categories of Encryption - Decryp...

Q. Categories of Encryption - Decryption ? Categories of Encryption/Decryption - Symmetric-key - encryption key (Ke) and the decryption key (Kd) are the same and secret

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

Advantages of bridges - network layer and routing, Advantages of Bridges ...

Advantages of Bridges By forwarding  frames  only to  the segment  where  host  resides  a bridge server the  following  purpose. a.Unwanted  traffic  as well  as network  c

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