Parallel construct in openmp, Computer Networking

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)

Posted Date: 3/4/2013 5:12:55 AM | Location : United States







Related Discussions:- Parallel construct in openmp, Assignment Help, Ask Question on Parallel construct in openmp, Get Answer, Expert's Help, Parallel construct in openmp Discussions

Write discussion on Parallel construct in openmp
Your posts are moderated
Related Questions
Systolic Array This interconnection network is a kind of pipelined array architecture and it is designed for multidimensional flow of data. It is used for executing fixed algor

Challenge Handshake Authentication Protocols (CHAP) CHAP as its an implies implements  a form of authentication that  requires a challenge  and a response. A CHAP authenticator

What is Intranet security Every company starts its operations with a genuine and honest thinking. As time passes, based on the needs of its employees as well as customers, a nu

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

Explain twisted pair cable. A pair of wires twisted with each other is CALLED as twisted pair cable.  A set of four pairs of twisted wires are bundled to form cable. These are

Intrinsic Functions HPF introduces some new intrinsic functions in addition to those defined in F90. The two most regularly used in parallel programming are the system inquiry

Simple Mail Transfer Protocols (SMTP) The application  layer  protocols  for electronic  mail is SMTP( Simple mail  transfer protocols). Internet  electronic  mail  has man

Which layer is responsible for routing by an internetwork Ans) The Network layer is responsible for routing. This is the primary job of routers, which handle at the Network laye

Router Routing achieved commercially popularity in the mid - 1980s - at a time when large-scale Internetworking began to change the fairly simple, homogeneous environments. Rou

What is an Object server? With an object server, the Client/Server application is printed as a set of communicating objects. Client object converse with server objects using an