Construct with private and firstprivate clauses, Computer Networking

Assignment Help:

In this example we will see the use of parallel construct with private and firstprivate clauses. At the end of the program i and j remain undefined as these are private to thread in parallel construct.

#include

int main()

{

int i, j;

i = 1;

j = 2;

#pragma omp parallel private(i) firstprivate(j)

{

i = 3;

j = j + 2;

}

printf("%d %d\n", i, j); /* i and j are undefined */

return 0;

}

In the following example, each thread in the parallel region decides what part of the global array x to work on, based on the thread number.


Related Discussions:- Construct with private and firstprivate clauses

Networking concepts, Networking Concepts Q1  What are the main feature...

Networking Concepts Q1  What are the main features of TCP connections? Why is it said that TCP provides full-duplex service? Q2  What are the differences between TCP conne

EHR, ONE TO MANY

ONE TO MANY

Explain pipeline processing, Pipeline Processing Pipelining is a scheme...

Pipeline Processing Pipelining is a scheme to realize, overlapped parallelism in the proposed way out of a problem on a digital computer in an economical way. To understand the

Operating system for server, Operating system for Server Since 1994, w...

Operating system for Server Since 1994, when the original pair of web servers - NCSA HTTPd and CERN HTTPd , were proposed, dozens of commercial and shareware programs have

Determine the difficulties arise with database connectivity, Determine the ...

Determine the Difficulties arise with database connectivity A number of difficulties arise with database connectivity and the company may have to shell out an enormous amount

Determine the mean node-node path, Mean node-node path The mean node-no...

Mean node-node path The mean node-node path is two times the mean node-root path.  Number the levels of the tree with the root as 1 and the deepest level as N.  The path from t

Domain names and address resolution, However what if you don't know about t...

However what if you don't know about the IP address of the computer you wished to connect to? What if you have to access a web server referred to as www.abc.com? How does your web

Determine about the tcp/ip and osi model, Determine about the TCP/IP and OS...

Determine about the TCP/IP and OSI model Both models are based on the layered protocols. Both comprise network, transport and application layer. In both the models, transport s

Netware ipx addressing uses a network number, NetWare IPX addressing uses a...

NetWare IPX addressing uses a network number and a node number. Which  statements are true? A. The network address is administratively assigned and can be up to 16 hexadecimal digi

Modern computer , modern technology in world of 21 century

modern technology in world of 21 century

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