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
Thicknet Characteristics It Supports transmission rates up to 10 Mbps in Baseband mode Less expensive in comparison of fiber-optic cable however more expensive than ot

What advantages does fiber optics have over other media? One main advantage of fiber optics is that is it less susceptible to electrical interference. It also supports higher ba

Virtual Private Network  ( VPNs) When we use the  internet  or the  risks to the security of our data  arise. The solve the security problem a virtual private network  used for

Mean node-node path The mean node-node path is two times the mean node-root path.  Number the levels of the tree with the root as 1 and the deepest level as N.  The path from t

Question: a) Outline the concept of the Real Time Gross Settlement (RTGS) system in Mauritius and name the three main system components of the MACSS. b) Differentiate bet

Question 1 Discuss the following Switching Mechanisms- Circuit switching Message switching Packet switching   Question 2 Discuss the following IEEE standard

Firewalls Firewalls emerged as a new technology in 1990s but its idea was present near two decades back. Historical context of "Firewall" is quite literal. It was in use to des

POWER SUPPLY SYSTEM IN  SATELLITE SYSTEM Satellite Earth Station relies on the public power supply system. Two generators (1+1) of 250 KVA each in parallel connection having fa

Determine about the Security Systems If the company intends to connect to the Internet, then it should pay great attention to the configuration of firewalls. Just as no one wo

What is a computer network? Computer Network is a collection of distributed intelligent devices that are connected with each other with transmission media for the purpose of da