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

Firewall architectures-screened host architecture, Screened Host Architectu...

Screened Host Architecture This architecture consists of two host machines: a Screening Router and a Screening Host. Screening Router is placed between a local network and the

Identify three characteristics of switches, Switches operate at layer 2. Th...

Switches operate at layer 2. They enhance bandwidth by decreasing the number of devices sharing the media. They isolate collisions. Like a bridge they forward traffic based upon la

Data communications and networks, A magazine publisher based in Nairobi has...

A magazine publisher based in Nairobi has branch in Kisumu, and one in Mombasa. The company has kept in touch by telephone and courier service. Each office is networked. The networ

Address space, Internet addresses are divided in five distinct types of cla...

Internet addresses are divided in five distinct types of classes. The classes were designated A by E. class A address space lets a small number of networks although a large number

What is transmission control protocol, Q. What is Transmission Control Prot...

Q. What is Transmission Control Protocol? Transmission Control Protocol TCP Services - Stream delivery service Permits the sending process to deliver data as a stream

Advanced interface module and system bus, Advanced Interface Module (AIM) s...

Advanced Interface Module (AIM) socket This is an 100 pin internal socket. It is provide for plug in the Advance interface module card. Purpose of AIM card is concentrate in th

Matlab chi square functioning, Create a custom chi-square function in matla...

Create a custom chi-square function in matlab, MATLAB in Statistics

Maths, the equation x3-6x+9x-5=0

the equation x3-6x+9x-5=0

Name the default lmi type, Cisco is the defaul LMI type. There are thre...

Cisco is the defaul LMI type. There are three types of LMI standards:  ANSI - Annex D defined by ANSI standard T1.617  ITU-T (Q.933A) - Annex A defined by Q933A  Cisco

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