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

INAB-426-, As• New Content (Week 5) o System Integration Implementation P...

As• New Content (Week 5) o System Integration Implementation Plan ? Develop a detailed implementation plan that captures the following (address 4 of these): ? Testing activitie

Method of ip multicasting or multicast ip address, Can you describe the con...

Can you describe the concept of IP multicasting or multicast IP address?

What is the difference between arp and rarp, ARP - Address Resolution Proto...

ARP - Address Resolution Protocol It is the protocol that traces IP addresses to MAC addresses. RARP - Reverse Address Resolution Protocol It is the protocol within the TC

How do we describe the concept of dpu, How do we explain the method of DPU,...

How do we explain the method of DPU, Segments, Datagram, Frame and  packet?

Tcp segment structure - transport layer, TCP Segment Structure Figure ...

TCP Segment Structure Figure shows the format of the TCP segment. The  header consists  of a 20 bytes  fixed  part  plus a variable size  options fields. The description  o

Describe the dsdm life-cycle with a suitable diagram, Question : (a) De...

Question : (a) Describe how ‘prototyping' is important to RAD. (b) List main features of ‘prototyping'. (c) List main principles of DSDM. (d) Describe the DSDM life-

Objectives of performance evaluations, OBJECTIVES After studying this ...

OBJECTIVES After studying this part, you should be able to: Explain the Metrics for Performance Evaluation; Notify about various Parallel System Overheads; Desc

Describe about the network equipment and connectivity, Describe about the N...

Describe about the Network equipment and connectivity Network equipment and connectivity should address various networking equipments such as routers, types of cables, as well

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