Questions tagged [parallel-for]

Parallel.For executes a for loop in which iterations may run in parallel to each other.

Parallel.For executes a for loop in which iterations may run in parallel to each other.

References

98 questions
0
votes
0 answers

Drawline in parallel for loop

I would like to speed up the drawing of lines. Why does the parallel for loop not work? It does not draw anything. I'm also open to other ideas how to speed it up. I edited the code for incremental for loop. Though I get "A first chance exception of…
user2799180
  • 719
  • 1
  • 10
  • 28
0
votes
1 answer

TBB parallel_for with less number of threads

I have written a multi-view face detection code using opencv face detector. I am running five detectors (trained for different pose angles) over an image and taking their weights to detect faces in an image. I have made the code parallel using TBB…
uiqbal
  • 111
  • 2
0
votes
1 answer

Triple For Loop in CUDA

How can I write below C++ expression in CUDA? It's easy for first loop but after? ( I put my launch kernel ) launch kernel dim3 dimBlock( 16 ); dim3 dimGrid( ( c + ( dimBlock.x - 1 ) ) / dimBlock.x ); C++ 3-loop expression for ( int i = 0; i < c;…
user2055437
  • 57
  • 1
  • 12
0
votes
2 answers

concurrent_vector is not working inside parallel_for ( PPL )

there is a sample working code below ( parallel_for using Parallel Pattern Library ( ppl ) ). The main problem in here is sqr < concurrent_vector > stored values changing in every execution, but it should not be! I used < concurrent_vector > for…
user2055437
  • 57
  • 1
  • 12
0
votes
1 answer

C++ Parallel Loop without locking critical section using PPL

in the below code, there is parallel_for loop implemented with PPL. The main problem is here; abc vector values is not correct when i was commented cs.lock() and cs.unlock(). I am using concurrency_vector type for randomly access array values but…
user2055437
  • 57
  • 1
  • 12
-1
votes
2 answers

C#, For Loop Inside Parallel For Loop Not Working Correctly

This is my code, and not working correctly. Normal for loop from 0 to UrlList Count. Maybe 1500 - 2000; After Every 10 loop, controlling session. If not exists or timeout, going and refresh. And This point first parallel loop working correctly. i =…
-2
votes
1 answer

I need to iterate Parallel for loop on StreamReader ReadLine() but stuck at multiple thread access to object

I tried by creating the stream reader object (sr) inside the parallel for loop. It's working but taking 1.3 minutes to fetch data which should have been fetched under 4 seconds. The problem as I hope is somewhere related to this StreamReader object.…
-2
votes
1 answer

Don't let GUI freeze with parallel.for due to the reading of a big array

I'm trying to get a big string text array from a TextBox where lines are string[]. It works but the problem is that with big amounts of data in input the GUI of program is frozen for a moment while it processes the entire size of the array…
Programmer
  • 83
  • 1
  • 9
1 2 3 4 5 6
7