diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2014-06-05 10:49:34 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2014-06-05 10:49:34 -0700 |
commit | 8998f4099e20ebc80db0aba2582301cd48d31c5a (patch) | |
tree | 18fb2111a71d612cf9e31de79e1c4b7250501fdf /unsupported/test/cxx11_tensor_thread_pool.cpp | |
parent | 6fa6cdd2b988da98cbdd2b1a5fd2fd3b9d56a4b1 (diff) |
Created additional tests for the tensor code.
Diffstat (limited to 'unsupported/test/cxx11_tensor_thread_pool.cpp')
-rw-r--r-- | unsupported/test/cxx11_tensor_thread_pool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unsupported/test/cxx11_tensor_thread_pool.cpp b/unsupported/test/cxx11_tensor_thread_pool.cpp index c9de71da3..b371e8a71 100644 --- a/unsupported/test/cxx11_tensor_thread_pool.cpp +++ b/unsupported/test/cxx11_tensor_thread_pool.cpp @@ -12,6 +12,7 @@ #include "main.h" #include <Eigen/CXX11/Tensor> +#include "thread/threadpool.h" using Eigen::Tensor; @@ -24,8 +25,10 @@ void test_cxx11_tensor_thread_pool() in1.setRandom(); in2.setRandom(); - Eigen::ThreadPoolDevice thread_pool_device(3); - out.device(thread_pool_device) = in1 + in2 * 3.14; + ThreadPool thread_pool(2); + thread_pool.StartWorkers(); + Eigen::ThreadPoolDevice thread_pool_device(&thread_pool, 3); + out.device(thread_pool_device) = in1 + in2 * 3.14f; for (int i = 0; i < 2; ++i) { for (int j = 0; j < 3; ++j) { |