Add generic scan method

This commit is contained in:
Igor Babuschkin 2016-06-03 17:37:04 +01:00
parent 8d97ba6b22
commit dc03b8f3a1

View File

@ -498,6 +498,13 @@ class TensorBase<Derived, ReadOnlyAccessors>
return TensorScanProdOp(derived(), axis);
}
template <typename Reducer>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const TensorScanOp<Reducer, const Derived>
scan(const Index& axis, const Reducer& reducer) const {
return TensorScanOp<Reducer, const Derived>(derived(), axis, reducer);
}
// Reductions.
template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const TensorReductionOp<internal::SumReducer<CoeffReturnType>, const Dims, const Derived>