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 are the various security measures, What are the various security meas...

What are the various security measures A matter of prime concern to companies is the overheads in the form of huge investment on extra hardware and software. It is quite possi

Parts count method calculation, M E T HOD OF CALCULATION It involves...

M E T HOD OF CALCULATION It involves counting the number of each part type and multiplying with the generic failure rate of each part. On summing up the product, we obtain t

Explain the different types of physical networking, Question 1 Explain the...

Question 1 Explain the different activities carried out on E-Commerce, with appropriate examples Question 2 Explain the core components of E-Commerce in detail with appropria

netware protocol works on layer 3, Which NetWare protocol works on layer 3...

Which NetWare protocol works on layer 3--network layer-of the OSI model? Ans)IPX

What is border gateway protocol, What is BGP (Border Gateway Protocol)? ...

What is BGP (Border Gateway Protocol)? It is a protocol used to promote the set of networks that can be reached within an autonomous system. BGP enable this information to be c

Ajax, Ajax is a relatively new set of techniques that, in a sense, implemen...

Ajax is a relatively new set of techniques that, in a sense, implement some of the functionalities originally provided by RPC. Ajax is primarily used to build web applications with

Quality of service, Networks are more frequently being prepared to allow sp...

Networks are more frequently being prepared to allow specification of the quality of service needed by users. For example: - a typical voice telephone call may give a QoS para

Private network, Single company or organization owns this. They are usually...

Single company or organization owns this. They are usually LAN technologies. There can be multiple LANs in a campus or building linked together. They are sometimes known Intranet.

What are the local network security issues, Q. What are the Local Network S...

Q. What are the Local Network Security Issues? Local Network Security Issues Password Protection - Encrypted username & password Group/Owner ID's - File Permissi

Networking, can we correct errors using crc?

can we correct errors using crc?

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