aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jonathon Koyle <litereader@gmail.com>2019-04-10 10:02:33 -0600
committerGravatar Jonathon Koyle <litereader@gmail.com>2019-04-10 10:02:33 -0600
commit9a3f06d836dd40ab243521fc3a87425563e2aa11 (patch)
tree235230e673c41b38176de01efd13d1c75ec8bbbd
parent66a885b61ee73a751cf07ba0e3c91919dc95b5b9 (diff)
Update TheadPoolDevice example to include ThreadPool creation and passing pointer into constructor.
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/README.md5
1 files changed, 4 insertions, 1 deletions
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<float, 2> c(30, 50);