From 9a3f06d836dd40ab243521fc3a87425563e2aa11 Mon Sep 17 00:00:00 2001 From: Jonathon Koyle Date: Wed, 10 Apr 2019 10:02:33 -0600 Subject: Update TheadPoolDevice example to include ThreadPool creation and passing pointer into constructor. --- unsupported/Eigen/CXX11/src/Tensor/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/README.md b/unsupported/Eigen/CXX11/src/Tensor/README.md index d84bb8550..006f35b23 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/README.md +++ b/unsupported/Eigen/CXX11/src/Tensor/README.md @@ -430,8 +430,11 @@ This is exactly the same as not inserting a `device()` call. #### Evaluating with a Thread Pool + // Create the Eigen ThreadPool + Eigen::ThreadPool pool(8 /* number of threads in pool */) + // Create the Eigen ThreadPoolDevice. - Eigen::ThreadPoolDevice my_device(4 /* number of threads to use */); + Eigen::ThreadPoolDevice my_device(&pool, 4 /* number of threads to use */); // Now just use the device when evaluating expressions. Eigen::Tensor c(30, 50); -- cgit v1.2.3