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
MPI_Wtime ( ) returns elapsed wall-clock time in seconds as some arbitrary point in past. Elapsed time for program segment is specified by the difference between MPI_Wtime values a

Question : (a) How do you relate the subsequent terms in the context of an information system: data, information and decision-making. (b) Why do you think organisations nowa

Explain the building blocks of Client/Server? The client side building block runs the client side of the application. The server side building block runs the server side of

Which protocol will send a message to routers if a network outage or congestion happen Ans) Internet Control Message Protocol - ICMP will send a message to routers if a network

Q. Show VPNs Security and the Internet Model? - VPN's Security and the Internet Model - Application layer - provide for each application protocol (other layers may be left v

What is the difference between TFTP and FTP application layer protocols? The Trivial File Transfer Protocol (TFTP) allows a local host to obtain files from a remote host but d

Explain about the Browser A program that allows the user to access and read information on the World Wide Web. Netscape® Navigator and Microsoft Explorer® are the best known

Question 1 What does the SNMP access policy represent? Question 2 Does there exist any formal functional specification for SNMPv1 management? Question 3 In the con


State the list of protocols supported by the Intranet The following is the list of protocols supported by the Intranet: ARP: Address resolution Protocol is used to resol