mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Pad PerThread when we emulate thread_local to prevent false sharing.
This commit is contained in:
parent
6cedc5a9b3
commit
668690978f
@ -153,6 +153,10 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
ThreadPoolTempl* pool; // Parent pool, or null for normal threads.
|
||||
uint64_t rand; // Random generator state.
|
||||
int thread_id; // Worker thread index in pool.
|
||||
#ifndef EIGEN_THREAD_LOCAL
|
||||
// Prevent false sharing.
|
||||
char pad_[128];
|
||||
#endif
|
||||
};
|
||||
|
||||
Environment env_;
|
||||
|
Loading…
Reference in New Issue
Block a user