mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Add an extra check for the RunQueue size estimate
This commit is contained in:
parent
b1a8627493
commit
56c6373f82
@ -209,7 +209,9 @@ class RunQueue {
|
|||||||
} else {
|
} else {
|
||||||
// This value will be 0 if the queue is empty, and undefined otherwise.
|
// This value will be 0 if the queue is empty, and undefined otherwise.
|
||||||
unsigned maybe_zero = ((front ^ back) & kMask2);
|
unsigned maybe_zero = ((front ^ back) & kMask2);
|
||||||
eigen_assert(maybe_zero == 0 ? CalculateSize(front, back) == 0 : true);
|
// Queue size estimate must agree with maybe zero check on the queue
|
||||||
|
// empty/non-empty state.
|
||||||
|
eigen_assert((CalculateSize(front, back) == 0) == (maybe_zero == 0));
|
||||||
return maybe_zero;
|
return maybe_zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user