diff options
author | Paul Tucker <tucker@google.com> | 2018-07-16 17:53:36 -0700 |
---|---|---|
committer | Paul Tucker <tucker@google.com> | 2018-07-16 17:53:36 -0700 |
commit | 4e9848fa8600be69dfb51405606eafa1dba8d0bf (patch) | |
tree | 618a1f39a1255b1bd95f69801c3f604621bfa45f /unsupported/Eigen/CXX11 | |
parent | b3e7c9132d41da75c0a6af783300cb11101010db (diff) |
Actually add optional Allocator* arg to ThreadPoolDevice().
Diffstat (limited to 'unsupported/Eigen/CXX11')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h index be397e1b6..c9534d400 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h @@ -95,8 +95,8 @@ static EIGEN_STRONG_INLINE void wait_until_ready(SyncType* n) { // Build a thread pool device on top the an existing pool of threads. struct ThreadPoolDevice { // The ownership of the thread pool remains with the caller. - ThreadPoolDevice(ThreadPoolInterface* pool, int num_cores) - : pool_(pool), num_threads_(num_cores), allocator_(nullptr) { } + ThreadPoolDevice(ThreadPoolInterface* pool, int num_cores, Allocator* allocator = nullptr) + : pool_(pool), num_threads_(num_cores), allocator_(allocator) { } EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const { return allocator_ ? allocator_->allocate(num_bytes) |