mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1598: Let MaxSizeVector respect alignment of objects and add a unit test
Also revert 8b3d9ed081
This commit is contained in:
@@ -169,7 +169,9 @@ class EventCount {
|
||||
|
||||
class Waiter {
|
||||
friend class EventCount;
|
||||
std::atomic<Waiter*> next;
|
||||
// Align to 128 byte boundary to prevent false sharing with other Waiter
|
||||
// objects in the same vector.
|
||||
EIGEN_ALIGN_TO_BOUNDARY(128) std::atomic<Waiter*> next;
|
||||
std::mutex mu;
|
||||
std::condition_variable cv;
|
||||
uint64_t epoch;
|
||||
@@ -179,9 +181,6 @@ class EventCount {
|
||||
kWaiting,
|
||||
kSignaled,
|
||||
};
|
||||
// Pad past 128 byte boundary to prevent false sharing with other Waiter
|
||||
// objects in the same vector.
|
||||
char pad_[128];
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user