diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-03 17:20:56 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-03 17:20:56 -0700 |
commit | 47fefa235f73315bc57d685a7bc9cd8d3577349f (patch) | |
tree | b6a380d7ae558dcafa2fa586a54e6632564fe16b /unsupported/Eigen/CXX11/src/Tensor/TensorBase.h | |
parent | a8d264fa9c56e42f77e2129d4e504f5c854821c2 (diff) |
Allow move-only done callback in TensorAsyncDevice
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorBase.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorBase.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h index 095c85dc4..f2aa37256 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h @@ -1065,12 +1065,12 @@ class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> { #ifdef EIGEN_USE_THREADS // Select the async device on which to evaluate the expression. - template <typename DeviceType> + template <typename DeviceType, typename DoneCallback> typename internal::enable_if< internal::is_same<DeviceType, ThreadPoolDevice>::value, - TensorAsyncDevice<Derived, DeviceType>>::type - device(const DeviceType& dev, std::function<void()> done) { - return TensorAsyncDevice<Derived, DeviceType>(dev, derived(), std::move(done)); + TensorAsyncDevice<Derived, DeviceType, DoneCallback>>::type + device(const DeviceType& dev, DoneCallback done) { + return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done)); } #endif // EIGEN_USE_THREADS |