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

What are the internal threats - security, What are the Internal Threats ...

What are the Internal Threats Internal security problems are probably the most common. One never knows what someone is going to do. Even the most loyal employees or workers can

Network design by detailing infrastructure, i have an assigment due and wan...

i have an assigment due and want some one to do my assognment

Objectives of parallel programming, OBJECTIVES After reading this unit,...

OBJECTIVES After reading this unit, you should be able to: Describe the basics of parallel programming; Explain the parallel programming based on message passing;

What advantages does fiber optics have over other media, What advantages do...

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

Give some examples of private network addresses, Give some examples of priv...

Give some examples of private network addresses. 10.0.0.0 with a subnet mask of 255.0.0.0 172.16.0.0 with subnet mask of 255.240.0.0 192.168.0.0 with subnet mask of 255.2

Building distributed systems, Unfortunately, building real-life distributed...

Unfortunately, building real-life distributed systems is not easy. It is hard, for instance, to implement instructions such as "send this data structure to be processed on that com

Factor causing parallel overheads, Factor Causing Parallel Overheads F...

Factor Causing Parallel Overheads Figure clearly explains that the performance metrics are not able to achieve a linear curve in comparison to the enhance in number of process

Characterization of networks, CHARACTERIZATION OF NETWORKS:  There are...

CHARACTERIZATION OF NETWORKS:  There are three kinds of characterization of networks. LOCAL AREA NETWORK (LAN):  It is needed for a single building. METROPOLOTAN AREA

What is OSPF, What is OSPF? It is an Internet routing protocol that scal...

What is OSPF? It is an Internet routing protocol that scales well, can route traffic with multiple paths, and uses knowledge of an Internet's topology to make precise routing de

Memory pools-input and output pool-pci pool, Memory Pools IOS manages a...

Memory Pools IOS manages available free memory thorugh  memory pool series, which are essentially heaps in the generic sense; each pool is a set of memory blocks that can be al

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