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
PARTS COUNT METHOD This prediction method is applicable at preliminary stages, during bid proposal and early design phases; when insufficient information is available regardin

Name the OSI layer which performs code conversion, code formatting and encryption Ans) Presentation layer performs code conversion, code formatting and encryption

explain Learning Bridges in deatil.

FDDI Media Class B or SAS (single-attachment stations) attach to one ring Class A or DAS (dual attachment stations) attach to both rings. SASs is attached to the primary rin

What is the Gateway A Gateway is a device like a mini or microcomputer capable of operating on a standalone basis but which also gives connection for communication with the oth


10Base-T: Twisted Pair Ethernet Most popular standard simplest to install and reconfigure Star topology LAN utilize UTP cable no need for AUI It supports data rag


Determine about the infrared spectrum (1) The spectrum for infrared is virtually unlimited, which shows the possibility of achieving extremely high data rates. (2) The infra

Q. Why we use numbering frames? Why numbering frames? Stop--and-wait ARQ, 1. Numbering Frames prevents the retaining of duplicate frames.. 2. Numbered acknowled