Construct with private and firstprivate clauses, Computer Networking

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.

Posted Date: 3/4/2013 5:20:35 AM | Location : United States







Related Discussions:- Construct with private and firstprivate clauses, Assignment Help, Ask Question on Construct with private and firstprivate clauses, Get Answer, Expert's Help, Construct with private and firstprivate clauses Discussions

Write discussion on Construct with private and firstprivate clauses
Your posts are moderated
Related Questions
Name the protocol which is networking middleware SOCKS is a networking middleware: a circuit-level gateway, acting as a proxy and is placed at the session layer to mediate clie

Explain the physical and logical paths in a computer communication network also

Question: a) List three characteristics and two potential problems of a peer-to-peer environment. b) List three characteristics and two potential problems of a client/

Concept of how does the IP message finally reassemble?

The second point to consider is that from each location, some calls are internal to that site and some are going to outside locations. Again, as an approximation, MyCo telecom peop

Post Office  Protocols Version In computing  the post office protocol  version 3 (POP3) is an  application layer internet standard  protocols  used by  local e mail  clients

List the layers of OSI There are seven layers in OSI model a. Physical Layer b. Data Link Layer c. Network Layer d. Transport Layer e. Session Layer f. Presen

The LAN switch copies the whole frame into its onboard buffers and then looks up the destination address in its forwarding, or switching, table and verifies the outgoing interface

VPN Technology For an organization  VPN  technology  uses some main  techniques for privacy a.Encryption /Authentication b.Tunnelling c.Fire walls

Components of the VPN When  using  VPN we incorporate many pieces of a jigsaw puzzle each piece services its own  function to private  the interoperation and the  security  nec