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

Name the strategies devised by ietf, Question: a) Show the shortest for...

Question: a) Show the shortest form of the following IPv6 address: 2340:0000:0000:000F:7000:119A:A001:0000 b) The IPv6 header includes a Class field and a Flow ID field. Bri

Explain the multipath resistance, Explain the Multipath resistance The ...

Explain the Multipath resistance The chipping codes used for CDMA not only exhibit low cross-correlation but also low autocorrelation. Thus, a version of the signal that is del

Explain about the intranet hardware and software, Explain about the Intrane...

Explain about the Intranet hardware and software Intranets not only provide a secure environment for companies but also provide an excellent working environment that is full of

Bit stream structure, In OSI 7 layer model, a header, or possibly a trailer...

In OSI 7 layer model, a header, or possibly a trailer, can be added to the data unit at each layerI 7 layer, but we will define a simple virtual packet which contains only 8bit dat

Explain the architecture and usage of isdn, Computer Networks 1. Write ...

Computer Networks 1. Write about different network structures in use. 2. Explain the architecture and usage of ISDN. 3. Describe the concept of framing in Data Link Layer

Multi tasking environment, Multi Tasking Environment Multi tasking exp...

Multi Tasking Environment Multi tasking exploits parallelism by: 1)  Concurrently using the multiple functional units 2)  Pipelining functional units are pipe line toget

What are the value added services, What are the value added services Ma...

What are the value added services Many organisations are demanding higher services (also called value added services) such as faxing, minimal cost call routing, connectivity to

Briefly explain three benefits of networking, Question 1 What are the as...

Question 1 What are the aspects you should consider while creating a showreel? Question 2 What are the different patterns of writing a resume? Elaborate each of them wit

What is dynamic host configuration protocol, How does dynamic host configur...

How does dynamic host configuration protocol aid in network administration? Instead of having to visit every client computer to configure a static IP address, the network admin

Protocol gets a hardware address from a known ip address, Normal 0 ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

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