I have code like this (pseudocode, because I can't show my program):
concurrent_vector a, b, c;
concurrent_unordered_map mapForResult;
for(i=0; i<sequenceCount; i++){
variables temp_a, temp_b, temp_c;
database->read(&a, &b, &c);
}
parallel_for(0, sequenceCount, [](int i){
var aa = a[i];
var bb = b[i];
var cc = c[i];
resultOfFunction = MakeFunction(aa, bb, cc);
mapForResults.insert(resultOfFunction);
}, static_partitioner());
It's working, but it's much slower than sequential version. Any ideas why? It's my first time with ppl.h, so I don't know all tips&tricks.