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

Explain in detail about wireless network, Explain in detail about wireless ...

Explain in detail about wireless network Think about unseen terminal problem. Imagine a wireless network consist of five stations, A through E, such that each one them is in r

What is mpmm, MPMM is a Project Management Methodology which gives a comple...

MPMM is a Project Management Methodology which gives a complete "framework" for managing projects. This framework gives you with a step-by-step walkthrough of the phases, activitie

Link state packet - network layer and routing , Link State Packet When ...

Link State Packet When  a router floods  the network  with information about its  neighbourhood. It is said to  be advertising. The basis of this  advertising is  a short  pack

Transmission robustness and security, Transmission robustness and security ...

Transmission robustness and security Unless properly designed, a wireless LAN might be interference prone and simply eavesdropped. The design of a wireless LAN must allow relia

Authoritative dns servers application layer, Authoritative DNS Servers ...

Authoritative DNS Servers Every  organization with publicly  accessible hosts  ( such  as web  server and mail  several  on the  internet  must  provide  publicly accessible D

Describe in brief about tree topology, Tree topology Comments 1 -...

Tree topology Comments 1 - This features star nodes on a bus network 2 - All the disadvantages and advantages of both types of networks described above apply to this s

Tools that an attacker can use to crack wep, Question: Consider that yo...

Question: Consider that you have to configure a small WLAN of 8 computers using Wired Equivalent Privacy (WEP) and that you have to best make use of its available security f

Explain about traditional modems, Q. Explain about Traditional Modems? ...

Q. Explain about Traditional Modems? - Subsequent to modulation by the modem an analog signal reaches the telephone company switching station where it sampled and digitized to

Types of parallel programming, TYPES OF PARALLEL PROGRAMMING There are ...

TYPES OF PARALLEL PROGRAMMING There are several parallel programming models in common use. Some of these are: Message Passing; Data Parallel programming; Shared

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