aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-21 11:03:02 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-21 11:03:02 -0700
commitf670613e4b90609229b016c3e2d1be9f4b8d54eb (patch)
tree6a49110d353d173a71d6f664323715cd2af0e7ca
parent6015422ee6e07377e9f8c776d136674ea303c57b (diff)
Fixed several compilation warnings
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h2
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h2
-rw-r--r--unsupported/test/cxx11_runqueue.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
index c3edae477..5c3d4d630 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
@@ -135,7 +135,7 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable> {
{
const Index PacketSize = Vectorizable ? unpacket_traits<typename Evaluator::PacketReturnType>::size : 1;
const Index size = array_prod(evaluator.dimensions());
- int num_threads = device.numThreads();
+ size_t num_threads = device.numThreads();
#ifdef EIGEN_USE_COST_MODEL
if (num_threads > 1) {
num_threads = TensorCostModel<ThreadPoolDevice>::numThreads(
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h
index aaa1d92c7..0544a6e15 100644
--- a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h
+++ b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h
@@ -168,7 +168,7 @@ class RunQueue {
// larger than it is during concurrent modifications. E.g. pop can
// decrement size before the corresponding push has incremented it.
// So the computed size can be up to kSize + 1, fix it.
- if (size > kSize) size = kSize;
+ if (size > static_cast<int>(kSize)) size = kSize;
return size;
}
}
diff --git a/unsupported/test/cxx11_runqueue.cpp b/unsupported/test/cxx11_runqueue.cpp
index 6c99eb981..d1770ee1b 100644
--- a/unsupported/test/cxx11_runqueue.cpp
+++ b/unsupported/test/cxx11_runqueue.cpp
@@ -30,11 +30,11 @@ void test_basic_runqueue()
RunQueue<int, 4> q;
// Check empty state.
VERIFY(q.Empty());
- VERIFY_IS_EQUAL(0, q.Size());
+ VERIFY_IS_EQUAL(0u, q.Size());
VERIFY_IS_EQUAL(0, q.PopFront());
std::vector<int> stolen;
VERIFY_IS_EQUAL(0, q.PopBackHalf(&stolen));
- VERIFY_IS_EQUAL(0, stolen.size());
+ VERIFY_IS_EQUAL(0u, stolen.size());
// Push one front, pop one front.
VERIFY_IS_EQUAL(0, q.PushFront(1));
VERIFY_IS_EQUAL(1, q.Size());