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
2 answers

Delay in parallel computing

I'm using parallel.for to launch in many threads a external program. But despite the fact that these are separate threads I need implement sth like delay. E.g. 2 threads want to launch this external program at the same moment - then one of them…
Saint
  • 5,127
  • 22
  • 57
  • 99
0
votes
0 answers

tbb loop sysmalloc: Assertion

I am new to tbb and I am trying to use parallel_for to run image data but I don't think it is working here is me original loop for (int count = 0; count < 100; it++, count++) { dt.insert(dt.end(), it->begin(), it->end()); …
kmia
  • 15
  • 3
0
votes
0 answers

How to make for loop run in Parallel using Python?

I have a data frame to process and I am trying to process that data frame in parallel instead of a sequential approach. The function that I am trying to make parallel return the list of values which is added to another list after obtaining the…
Upriser
  • 379
  • 3
  • 20
0
votes
0 answers

Parallel For loop inside razor view in Asp MVC

Just wondering how to write a parallel loop inside razor view in Asp MVC, I want something like this: @Parallel.For(0, 10, i => {

Hello World!

}); but I am unable to write Html code inside the loop. Thank you in advance for your help!
0
votes
0 answers

ParallelFor stuck

Prepare a static class, with a static property, static method, and a static constructor, then the bug comes: public class ParallelForBug { public static string StaticProperty = "StaticProperty"; static void method(int i) { …
Mike
  • 91
  • 3
0
votes
1 answer

ADLS ConcurrentAppend giving corrupt data for 1 MB files

When I use Parallel.For loop to append 10 files of 1 MB size concurrently to Azure Data Lake Service, I only see the content of last 2 files on my Azure Data Lake file, although I see the correct data getting printed to console. When I use a simple…
0
votes
0 answers

How to correctly parallelize an inner loop within a parallel region?

I am trying to parallelize inner for loops inside a parallel region: int num_threads, num_procs,max_row; double start_time; int i,h; # pragma omp parallel default(none) \ …
grace9
  • 27
  • 5
0
votes
1 answer

Does Concurrency::parallel_for has a command similar to omp_set_lock?

I have a class (say particle) which has a variable (say param1): class particle { double param1; . . . omp_lock_t particle_lck; . . . }; and a std::vector containing some instances of the particle class, vector
0
votes
1 answer

c++ ppl.h for parallel_for in linux

I made project in windows using c++ and now I am trying to build my project in linux(ubunt). However, I couldn't find ppl.h in linux. I used a lot of parallel_for in my project. What is the replacement can I use?
kangfox
  • 133
  • 1
  • 1
  • 8
0
votes
0 answers

Part of task in a task_group execute on main thread instead of a dedicated thread

I have a problem with tbb parallel_for() and task_group::run(). I have a code which launch a task on thread using task_group::run(). In this task, I use parallel_for() to parallelized a function. On the other hand, on the main thread, I do other…
Francois
  • 31
  • 4
0
votes
2 answers

OpenMP parallel "for" with "static" schedule

I've a confusion or maybe a misunderstanding of the parallel for behavior with a static schedule and default chunk size. For example the below picture What I excepted to have is yes the master thread will take an extra iteration but I excepted…
N0rA
  • 592
  • 1
  • 5
  • 24
0
votes
2 answers

virtual function and "no legal conversion for this pointer"

I have two classes as follow. class NeuroShield { public: NeuroShield(); uint16_t begin(); void setNcr(uint16_t value); uint16_t getNcr(); void setComp(uint8_t value); uint8_t getComp(); void setLastComp(uint8_t…
batuman
  • 6,072
  • 17
  • 79
  • 178
0
votes
2 answers

tbb determines incorrect concurrency

I am using tbb for parallelization and I have encountered an annoying issue. I use tbb::parallel_for and the algorithm is running on a single thread. if I print std::cout << tbb::task_scheduler_init::default_num_threads() << std::endl; it reports…
user1396055
  • 245
  • 1
  • 9
0
votes
0 answers

concurrency::parallel_for iterates inconsistently each time

I am using parallel for in one of my application which contains a loop like below. My understanding is that the parallel_for loop will iterate through the entire range but not necessarily in sequential order, but it will iterate through the entire…
Siddharth Chabra
  • 361
  • 1
  • 18
0
votes
0 answers

C# Parallel For loop not always exiting when done [intermittent error]

So I have a parallel for loop which works perfectly on its own, basically it loops through a 32000 item collection and does some parsing and math and what not and outputs the expected result. It takes long enough to warrent a loading bar so I made a…