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 layer can optionally support reliability, Ans) The Transport Layer : ...

Ans) The Transport Layer : Segments upper-layer applications. Establishes an end-to-end connection. Sends segments from one end host to another. Optionally, make sures

Will the client send a tcp or udp packet, Question: (a) Explain the usa...

Question: (a) Explain the usage of the following parts of the IPv4 datagram format. i. VERS ii. HLEN iii. TOTAL LENGTH iv. SERVICE TYPE v. HEADER CHECKSUM (b) Na

Fat tree, Fat tree It is a modified version of the tree network. In thi...

Fat tree It is a modified version of the tree network. In this group the bandwidth of edge (or the connecting wire among nodes) increases towards the root. It is a more practic

What is the role of ieee in computer networking, What is the role of IEEE i...

What is the role of IEEE in computer networking? IEEE, or the Institute of Electrical and Electronics Engineers, is an organization composed of engineers that issues and manage

Ip message finally reassemble, Concept of how does the IP message finally r...

Concept of how does the IP message finally reassemble?

Show the rs232 logic waveform, Q. Show the RS232 Logic Waveform ? RS-2...

Q. Show the RS232 Logic Waveform ? RS-232 Interface Three most important wires for the Serial interface Transmit - Pin 2 Receive - Pin 3 Ground - Pin

Explain mesh interconnection networks, Mesh : This is two dimensional netwo...

Mesh : This is two dimensional networks.  In this all processing elements are organised in a two dimensional grid. The processor in the row i and column j are indicated by PE i .

What is frequency borrowing, What is Frequency borrowing In the simples...

What is Frequency borrowing In the simplest case, frequencies are taken from adjacent cells by congested cells. The frequencies can also be assigned to cells dynamically.

Explain router, Router A router is used to route (transfer) data among ...

Router A router is used to route (transfer) data among two or more same networks. It verifies the next network point to which a data packet should be forwarded. The router is l

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