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

At the Physical layer of the OSI model Repeaters work by regenerating the signal to extend the distance it can travel.

Why do we require class and how many different parts of class exists?

UDP sends packets 'blind' down the network, and relies on upper-layer protocols to form connections and identify errors. TCP is a connection-oriented protocol that can give reliabl

How Intranet is different from Internet? Generally an Intranet is different from an Internet in the following ways: i. Intranet is a network within the organisation whereas

Q. Show the Class A Addresses? Class A Addresses Numerically the lowest Use merely one byte to identify the class type and netid Three bytes are obtainable

Scenario: Your Case Study must be based on the information provided. There will be no additional information. This must be submitted in a .doc, or .pdf format. If you send a few

What are the important topologies for networks? BUS topology: In this every computer is directly linked to primary network cable in a single line. Advantages: Inexpensive,

Q. Use of Two-Layer Switch? - Performs at the physical as well as data link layer - A bridge with many ports designed for faster performance - Allocates unique port to ea

I WOULD LIKE TO MAKE MY SELF CLEAR WHETHER THIS TYPE OF PROGRAMS ARE BASED ON COMPLETE SEVER RELATED AND MAINTENANCE OF AN ENTIRE SMALL ENTERPRISE NETWORK.