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

Multiplexing and de multiplexing, Multiplexing  and De multiplexing An...

Multiplexing  and De multiplexing Another  critical set of services that are provided by the transport layer is that of application multiplexing and de multiplexing. This featu

Example on TCP numbering, Q. Example on TCP numbering? Envision a TCP c...

Q. Example on TCP numbering? Envision a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for every seg

Process of skype is a web-based service, Skype is a web-based service which...

Skype is a web-based service which offers cheap and free phone calls. Explain step by step (in terms of networking technology) what really happens from the point when you initiate

What is the routing metric used by igrp, IGRP is a distance vector routing ...

IGRP is a distance vector routing protocol designed by Cisco. The maximum hop count is 255, and it uses a combination of variables to verify a composite metric. IGRP has an adminis

Describe the datawarehouse and data mining, Question 1: ‘There is an ov...

Question 1: ‘There is an overwhelming imperative for organisations to analyse every bit of information they can extract from their huge data warehouses for competitive advant

Subnetting (EIGRP), #questiGE 1-A Objectives: • Consolidate EIGRP knowle...

#questiGE 1-A Objectives: • Consolidate EIGRP knowledge. • Introduce the Route Redistribution concept. • Introduce the EIGRP External Routes concept. • Introduce the Default Met

Light sources and connectors, - Light source is LED (light-emitting diode) ...

- Light source is LED (light-emitting diode) or a laser - LEDs are cheaper however not as precise (unfocused) limited to short-distance use - Lasers is able to have a narrow

Signal to noise ratio, Problem 1. Explain the TCP/IP Reference Model wi...

Problem 1. Explain the TCP/IP Reference Model with diagram 2. Describe the following Maximum Data Rate of a Channel Signal to Noise Ratio   3. Describe the

Http is stateless - discuss this statement, Question : (a) Describe, w...

Question : (a) Describe, with the aid of a diagram, a hybrid topology of a network of your choice. (b) Briefly explain the similarity and differences between a switch and

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