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

Combinational circuit for sorting the string, Every input line of the combi...

Every input line of the combinational circuit represents an individual element of the string say xi and every output line results in the form of a sorted list. In order to attain t

Create a client and a server - message queues & socket, Lab will require yo...

Lab will require you to create a client and a server that communicate over either message queues, sockets, or a well known fifo. The data passed will be a simple request/response i

Network performance measured by delay and throughput, Q. Network performanc...

Q. Network performance measured by delay and throughput ? delay versus load Delay is composed of? Throughput v/s network load

Distributed systems, There are two dominant forms of building distributed s...

There are two dominant forms of building distributed systems: client-server systems, i.e. systems in which one machine acts as a server and act as clients; and peer-to-peer systems

Extranet, Extranets can also be utilized to link an intranet to the Interne...

Extranets can also be utilized to link an intranet to the Internet in order that remote offsite access can be built into a company's intranet through an authorized individual. It c

What are the local network security issues, Q. What are the Local Network S...

Q. What are the Local Network Security Issues? Local Network Security Issues Password Protection - Encrypted username & password Group/Owner ID's - File Permissi

Error correction in burst error correction, Q. Error Correction in Burst Er...

Q. Error Correction in Burst Error Correction? Error Correction-Burst Error Correction In its place of sending all the bits in a data unit together we can organize "N

Explain the Physical layer, Explain the Physical layer The Physical lay...

Explain the Physical layer The Physical layer of the OSI model sets standards for sending and receiving electrical signals among devices. It explains how digital data (bits) ar

Determine the advantages of fast ethernet, Fast Ethernet Operates a...

Fast Ethernet Operates at 100 Mbps faster speeds required for image processing, CAD, real-time audio and video No change in frame addressing, format or access method

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