Home › Forums › C Programming › Parallel Processing in win32 › Reply To: Parallel Processing in win32
January 11, 2008 at 5:59 am
#3239
shalizy
Participant
You can do but code should be parallel. Here function is same,That’s fine. But No variables b/w those call should not be shared.
Example: Parallel programming using By OpenMP API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #pragma omp sections num_threads(3)<br /> {<br /> #pragma omp section<br /> { <br /> Fun1();<br /> }<br /> #pragma omp section<br /> { <br /> Fun2();<br /> }<br /> #pragma omp section<br /> { <br /> Fun3();<br /> }<br /> }<br /> <br /> |
Then Here three threads execute parallelly.