Dear TBB experts,
Relating to my previous post, "Thread ID as index from zero to thread number",
I would like to prepare some data pool, cache data, per each thread (or task?) in RAII (construction) step before massive iterative computations,
so as not to bring about data race between each running thread (or task?). Currently, I prepare it as std::vector which contains thread number elements.
As an alternative way, I suppose that thread local storage (tbb::combinable, or tbb::enumerable_thread_specific) will work well,
but I do not know they are assigned and referred in one-to-one correspondence, which is prepared before the parallel loop.
### I explain what I meant by psuedocode,
// data pool is prepared in RAII step
// HERE, tls_data is prepared per each thread (or task? )
// some massive computation step
// HERE, tls_data would be used without data race, is it guranteed?
I would appreciate it if you could tell me my question.