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
importance of mail server ,proxy server ,modem ,intranet and web site

TCP is connection-oriented. Connection-oriented is a kind of connection established between the source & destination machines before any data is sent that means a connection is est

Primary Function Core network typically providing  the followings functionality 1.Aggregation : the  highest  level  of aggregation  in a service  provider  networks. The

BRIDGES:  A bridge is a hardware device also needed to connect two LAN code segments to extend a LAN. A bridge uses two NICs to connect two code segments. It listens to all tr

Hardware Cost It indicates to the cost concerned in the functioning of an interconnection network. It comprises the cost of arbiter unit, connectors, switches, interface logic

Store-and-forward switch  The layer 2 switch accepts a frame on an input line, buffers it briefly, and then routes it to the appropriate output line. Cut-through switch

5. CSMA/CD based Ethernet LANs in various sites and Frame Relay (FR) service to connect them together. You want to make a difference in the organization by upgrading the LANs to be

What is a Link? A link refers to the connectivity among two devices. It contains the type of cables and protocols used in order for single device to be able to communicate with

State in brief about the Graceful degradation With FDMA or TDMA, a fixed number of users can concurrently access the system. Though, with CDMA, as more user concurrently access

Q. Error Detection-General? Sender transmits every data unit twice Receiver performs bit-by-bit comparison between those two versions of data. Any mismatch would