mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-09 06:19:05 +08:00
Explicitely initialize all the atomic variables.
This commit is contained in:
parent
0f61343893
commit
6a5717dc74
@ -25,9 +25,9 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
|||||||
queues_(num_threads),
|
queues_(num_threads),
|
||||||
coprimes_(num_threads),
|
coprimes_(num_threads),
|
||||||
waiters_(num_threads),
|
waiters_(num_threads),
|
||||||
blocked_(),
|
blocked_(0),
|
||||||
spinning_(),
|
spinning_(0),
|
||||||
done_(),
|
done_(false),
|
||||||
ec_(waiters_) {
|
ec_(waiters_) {
|
||||||
// Calculate coprimes of num_threads.
|
// Calculate coprimes of num_threads.
|
||||||
// Coprimes are used for a random walk over all threads in Steal
|
// Coprimes are used for a random walk over all threads in Steal
|
||||||
|
@ -38,7 +38,7 @@ namespace Eigen {
|
|||||||
template <typename Work, unsigned kSize>
|
template <typename Work, unsigned kSize>
|
||||||
class RunQueue {
|
class RunQueue {
|
||||||
public:
|
public:
|
||||||
RunQueue() : front_(), back_() {
|
RunQueue() : front_(0), back_(0) {
|
||||||
// require power-of-two for fast masking
|
// require power-of-two for fast masking
|
||||||
eigen_assert((kSize & (kSize - 1)) == 0);
|
eigen_assert((kSize & (kSize - 1)) == 0);
|
||||||
eigen_assert(kSize > 2); // why would you do this?
|
eigen_assert(kSize > 2); // why would you do this?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user