diff options
author | Jonathon Koyle <litereader@gmail.com> | 2019-04-10 10:02:33 -0600 |
---|---|---|
committer | Jonathon Koyle <litereader@gmail.com> | 2019-04-10 10:02:33 -0600 |
commit | 9a3f06d836dd40ab243521fc3a87425563e2aa11 (patch) | |
tree | 235230e673c41b38176de01efd13d1c75ec8bbbd /unsupported/Eigen/CXX11/src | |
parent | 66a885b61ee73a751cf07ba0e3c91919dc95b5b9 (diff) |
Update TheadPoolDevice example to include ThreadPool creation and passing pointer into constructor.
Diffstat (limited to 'unsupported/Eigen/CXX11/src')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/README.md | 5 |
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); |