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

Process of securing an intranet, Process of Securing an Intranet Secur...

Process of Securing an Intranet Securing an Intranet is not a simple task. Mere installation of firewall hardware and software would not help the Intranet to protect itself. P

Name the standard isdn term for a native isdn modem, The marketing term 'IS...

The marketing term 'ISDN modem' was formed to help sell the ISDN idea to America. There is no such thing as an analog modulator demodulator for digital ISDN. The Terminal Adapter (

Who initiates the ‘trap'' message, Question 1 Who initiates the ‘Trap' mes...

Question 1 Who initiates the ‘Trap' message? When is this message generated? Question 2 Discuss the features of a typical Network Management System.List (Fault Management,

Ipx traffic on a network, To monitor ipx traffic on a network, what command...

To monitor ipx traffic on a network, what command would we use? Ans) show ipx traffic

State about the future of the intranet, Future of the intranet At ...

Future of the intranet At present, the world of information technology is guided bythe C 3 paradigm that stands for Command, Control and Communication, which is normally

Describe the depth penetration method for a crt, Question: (a) What do ...

Question: (a) What do you understand by the following terms related to LCDs: Reflective LCDs Backlit LCDs (b) By using an example, explain the main steps of the B

use dijkstras shortest-path algorithm compute short path, Consider the fol...

Consider the following network example. With the indicated link costs along each link in the figure, use Dijkstra's shortest-path algorithm to compute the shortest path from x to a

Describe the term disaster management as security threats, Describe the ter...

Describe the term Disaster Management as security threats Making and testing backups regularly could be the simplest and easiest of all the security measures. But a new questio

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