mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-11 08:53:14 +08:00
Fixed the threadpool test
This commit is contained in:
parent
29aebf96e6
commit
fe102248ac
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <Eigen/CXX11/Tensor>
|
#include <Eigen/CXX11/Tensor>
|
||||||
#include "thread/threadpool.h"
|
|
||||||
|
|
||||||
using Eigen::Tensor;
|
using Eigen::Tensor;
|
||||||
|
|
||||||
@ -25,9 +24,7 @@ void test_cxx11_tensor_thread_pool()
|
|||||||
in1.setRandom();
|
in1.setRandom();
|
||||||
in2.setRandom();
|
in2.setRandom();
|
||||||
|
|
||||||
ThreadPool thread_pool(2);
|
Eigen::ThreadPoolDevice thread_pool_device(3);
|
||||||
thread_pool.StartWorkers();
|
|
||||||
Eigen::ThreadPoolDevice thread_pool_device(&thread_pool, 3);
|
|
||||||
out.device(thread_pool_device) = in1 + in2 * 3.14f;
|
out.device(thread_pool_device) = in1 + in2 * 3.14f;
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user