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

Application layer , Normal 0 false false false EN-IN ...

Normal 0 false false false EN-IN X-NONE X-NONE Application Layer   The application  layer

Importance of clientsin intranet server, Importace of Clientsin intranet se...

Importace of Clientsin intranet server The most interesting thing is that almost every computer can be connected as a client to the Intranet server. The client could be based

Length- transport layer, Length This is a 16 bit  field  that  defines...

Length This is a 16 bit  field  that  defines  the total  length  of the user  datagram, header  plus data. This 16 bit  can define  a total  length  of a 0 to 65, 535 bytes.

What are the unix-based firewalls, What are the Unix-based firewalls T...

What are the Unix-based firewalls The Unix-based firewalls are considered most secured as compared to the Windows NT based ones. The firewalls bind the holes of the operating

Ethernet framing is used for tcp/ip, Which type of Ethernet framing is used...

Which type of Ethernet framing is used for TCP/IP and AppleTalk Ans)Ethernet SNAP

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

Define decoder, Define Decoder? A device or program that translates enc...

Define Decoder? A device or program that translates encoded data into its original format (e.g. it decodes the data). The term is often used in reference to MPEG-2 video and so

What is the full form of FDM and TDM, What is the full form of FDM and TDM ...

What is the full form of FDM and TDM It is both. Each of the 100 channels is possess its own frequency band (FDM), and on every channel two logical streams are intermixed by th

Analyze snort or pcap data from a public wifi hotspot, The project idea is ...

The project idea is : Analyze Snort or PCAP data from a public WIFI hotspot (describe traffice seen and what it is, protocols, ports, etc). This is what is expected. Initially r

Half duplex ethernet operation, Half-Duplex - Capability for data transmis...

Half-Duplex - Capability for data transmission in only single direction at a time among sending station and a receiving station.

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