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

Low frequency cut-off of the band-pass, Question Approximately what is ...

Question Approximately what is the low frequency cut-off of the band-pass filter shown in the figure?

Show the class D and class E addresses, Q. Show the Class D and Class E Add...

Q. Show the Class D and Class E Addresses? Class D and Class E Addresses Class D - reserved for multicast addresses Multicasting - transmission method which allo

Cable modem, Currently One more way of accessing the Internet being develop...

Currently One more way of accessing the Internet being developed is the use of cable modems. These need that you subscribe to a cable service & let you two-way communication with t

State the benefits of infrared light, State the benefits of Infrared light ...

State the benefits of Infrared light Infrared light does not penetrate walls or other opaque objects. This has two benefits: First, infrared communications can be more simply

Show the process of mail delivery, Q. Show the process of Mail Delivery? ...

Q. Show the process of Mail Delivery? Mail Delivery -Consists of three stages -First stage - email goes from user agent to local server, where it is stored until it ma

Briefly describe the purpose of windows powershell, Question: a) Brief...

Question: a) Briefly describe the purpose of Windows Powershell? b) Name ways software can be installed on Linux? c) What is an interrupt request? d) As the Networ

Explain how reducing ineffective taxation, Question: (a) With mobile t...

Question: (a) With mobile telecommunications providing an important engine for growth, continuing to stimulate growth and to ensure mobiles remain affordable for all, will re

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