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
Coaxial Cable Coaxial  cable  carries signals  of higher  frequency ranges than those in twisted pair cable. In part  because the two media are constructed quite  differently.

Describe the literal meaning of the term Intranet The literal meaning of the term Intranet as given in various dictionaries is as follows: In' tra net - n. 1)  A network

Q. Unshielded Twisted Pair - transmission media? - A most common kind suitable for both voice and data transmission - Categories are determined by chain quality - Cat 3 c


DVMRP • Distance vector multicast routing protocol: Distance vector multicast routing protocol are abbreviated as DVMRP. These protocols are suitable for small networks which



#question.what can we do with a spider when it red?.

QUESTION (a) Briefly describe the steps involved in Network Simplex Method. (b) In Radix Heap Algorithm, the technique of buckets is employed. However this idea is an extens

Q. What is network layer of osi model? - Describe end-to-end delivery of packets. - Defines logical addressing thus that any endpoint can be identified. - Defines how ro