diff options
author | 2016-05-26 15:57:19 -0700 | |
---|---|---|
committer | 2016-05-26 15:57:19 -0700 | |
commit | 1ae2567861e71ca132b7c46ace8f30b3e7e9b0c6 (patch) | |
tree | e81d6b70656f50f96dd265de2323e98c051426b4 /unsupported/Eigen | |
parent | 094f4a56c8eead03b6094a994f92ccd8660ce028 (diff) |
Fixed some compilation warnings
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h | 2 | ||||
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index f3f65f908..a60a17049 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -625,7 +625,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT }; // Decide whether we want to shard m x n contraction by columns or by rows. - static bool shardByCol(Index m, Index n, int num_threads) { + static bool shardByCol(Index m, Index n, Index num_threads) { // Note: we are comparing both n and m against Traits::nr, it is not // a mistake. We are trying to figure out how both n and m will fit into // the main sharding dimension. diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h index 8234e9ca0..c094563b7 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h @@ -155,7 +155,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { // Steal tries to steal work from other worker threads in best-effort manner. Task Steal() { PerThread* pt = GetPerThread(); - unsigned size = queues_.size(); + const size_t size = queues_.size(); unsigned r = Rand(&pt->rand); unsigned inc = coprimes_[r % coprimes_.size()]; unsigned victim = r % size; @@ -219,7 +219,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { int NonEmptyQueueIndex() { PerThread* pt = GetPerThread(); - unsigned size = queues_.size(); + const size_t size = queues_.size(); unsigned r = Rand(&pt->rand); unsigned inc = coprimes_[r % coprimes_.size()]; unsigned victim = r % size; @@ -240,7 +240,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { PerThread* pt = &per_thread_; if (pt->inited) return pt; pt->inited = true; - pt->rand = std::hash<std::thread::id>()(std::this_thread::get_id()); + pt->rand = static_cast<unsigned>(std::hash<std::thread::id>()(std::this_thread::get_id())); return pt; } |