#PRAGMA
-
Here is the documentation #pragma warning (C# Reference)[^]
"You get that on the big jobs."
-
That is not possible;
#pragma
is a compiler directive and has nothing to do with execution speed.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
That is not possible;
#pragma
is a compiler directive and has nothing to do with execution speed.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
but i want to reduce the execution time of a loop by making it parllel... for(int i=0;i<100;i++) { Console.WriteLine(i); } thatwhy i used pragma directive.. # prgma omp parllel for(int i=0;i<100;i++) { Console.WriteLine(i); } but its increse the time instead of reducing.. :( any sol for this??
-
but i want to reduce the execution time of a loop by making it parllel... for(int i=0;i<100;i++) { Console.WriteLine(i); } thatwhy i used pragma directive.. # prgma omp parllel for(int i=0;i<100;i++) { Console.WriteLine(i); } but its increse the time instead of reducing.. :( any sol for this??
This has nothing to do with your original question, and I have already answered with a suggestion here[^].
KUNWAR999 wrote:
# prgma omp parllel
What is this supposed to mean?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
This has nothing to do with your original question, and I have already answered with a suggestion here[^].
KUNWAR999 wrote:
# prgma omp parllel
What is this supposed to mean?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
Here[^] you go. Warning: it is a different world altogether. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
but i want to reduce the execution time of a loop by making it parllel... for(int i=0;i<100;i++) { Console.WriteLine(i); } thatwhy i used pragma directive.. # prgma omp parllel for(int i=0;i<100;i++) { Console.WriteLine(i); } but its increse the time instead of reducing.. :( any sol for this??
A few points. That pragma is for C/C++. If you want to have the sequence in order, you shouldn't try to turn it parallel as there is no guarantee of order of execution in parallel processing. If this isn't an issue, why not use the Task Parallel Library.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Here[^] you go. Warning: it is a different world altogether. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
Yes, I did discover that in the C++ compiler. My question was to get OP to explain what he/she thought it was, in terms of C#.
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman