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

Functions and significance of tcp header’s fields, Describe the functions a...

Describe the functions and significances of all fields (such as Source Port and Destination Port) of a TCP header. Functions and significance of tcp header's fields FIELDS

Ack received - trasnport layer, ACK Received If an ACK is received by ...

ACK Received If an ACK is received by the  sender. The  SR sender marks  that packet  as having  been received by the receiver.

Explain pipeline processing, Pipeline Processing Pipelining is a scheme...

Pipeline Processing Pipelining is a scheme to realize, overlapped parallelism in the proposed way out of a problem on a digital computer in an economical way. To understand the

Explain functions and protocols and services of each layer, Describe in pro...

Describe in proper details about OSI Model ? Explain the functions and protocols and services of each layer ?

Use of infrared, Q. Use of Infrared? - Frequencies among 300 GHz and 4...

Q. Use of Infrared? - Frequencies among 300 GHz and 400 THz - Short-range communication - High frequencies can't penetrate walls - Necessitate line-of-sight propagati

Financial services - fundamentals of networks , Financial Services Tod...

Financial Services Today   financial services are totally depended  on computer network. Application includes credit history searchers foreign exchange and  investment service

Switching, SWITCHING: A switched LAN has a single electronic device th...

SWITCHING: A switched LAN has a single electronic device that sends frames among the connected devices. A hub with several ports simulates a single shared phase. However a swi

Illustrate about the working of socks protocol, Illustrate about the workin...

Illustrate about the working of Socks protocol SOCKS is an open, industry-standard protocol advanced by the Authenticated Firewall Traversal working group of the IETF (Internet

Process management, Bootstrapping all the processes and establishing correc...

Bootstrapping all the processes and establishing correct lines of communication is, by itself, the toughest aspect of this assignment. Before writing any code you should think care

What is passive topology , When the computers on the network basically list...

When the computers on the network basically listen and receive the signal, they are referred to as passive due to they don't amplify the signal in any way.

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