I have a very simple parallel_for loop
tbb::parallel_for(tbb::blocked_range<int>(0, values.size()),
[&](tbb::blocked_range<int> r)
{
for (int i = r.begin(); i < r.end(); ++i)
{
values[i] = std::sin(i * 0.001);
}
});
Where 'values' is a vector of doubles. What I'd like to know is which threads work on which range in the loop. Is it possible to get a thread ID of some kind from TBB?