mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add block evaluation V2 to TensorAsyncExecutor.
Add async evaluation to a number of ops.
This commit is contained in:
@@ -1129,16 +1129,11 @@ class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {
|
||||
return TensorDevice<Derived, DeviceType>(dev, derived());
|
||||
}
|
||||
|
||||
#ifdef EIGEN_USE_THREADS
|
||||
// Select the async device on which to evaluate the expression.
|
||||
template <typename DeviceType, typename DoneCallback>
|
||||
typename internal::enable_if<
|
||||
internal::is_same<DeviceType, ThreadPoolDevice>::value,
|
||||
TensorAsyncDevice<Derived, DeviceType, DoneCallback>>::type
|
||||
device(const DeviceType& dev, DoneCallback done) {
|
||||
TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(const DeviceType& dev, DoneCallback done) {
|
||||
return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
|
||||
}
|
||||
#endif // EIGEN_USE_THREADS
|
||||
|
||||
protected:
|
||||
EIGEN_DEVICE_FUNC
|
||||
|
||||
Reference in New Issue
Block a user