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

Explain the operation of a token ring topology for a lan, Question: (a)...

Question: (a) Show by means of a diagram the Ethernet frame structure and describe the six fields of the Ethernet frame structure. (b) Explain the operation of the Carrier S

How is computer networks used in financial services, Q. How is computer net...

Q. How is computer networks used in Financial services? Financial services:   Today's financial services are totally depended on networks. Application includes credit history

Type of failures and bathtub curve, AILURES AND BATHTUB CURVE The life ...

AILURES AND BATHTUB CURVE The life of a component system can be grouped into three different phases typical curve depicting these three is called the bathtub curve due to its s

Reliable data transfer over a perfectly reliable channel r, Reliable  dat...

Reliable  data transfer  over a perfectly reliable channel rdt 1.0 First  all consider  the simplest  care in  which  the underlying  channel  perfectly reliable.  The protoco

Explain typical network topologies, Question: a) Explain briefly three ...

Question: a) Explain briefly three typical network topologies giving one advantage and one disadvantage of each topology. Explain the three topologies with appropriate diagrams

Advantages, What are advantages of having e-commerce over extranets

What are advantages of having e-commerce over extranets

What is logical link control, What is logical link control? One of two ...

What is logical link control? One of two sublayers of the data link layer of OSI reference model, as explained by the IEEE 802 standard. This sublayer is responsible for mainta

Determine the definition of hdlc, Determine the definition of HDLC HDLC...

Determine the definition of HDLC HDLC has only one address field. In a LAN, any station may transmit to any other station. The receiving station needs to see its own address in

What do you meant by triple x in networks, What do you meant by "triple X" ...

What do you meant by "triple X" in Networks? The function of PAD (Packet Assembler Disassembler) is defined in a document known as X.3. The standard protocol has been explaine

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