Merged in ibab/eigen (pull request PR-192)

Add generic scan method
This commit is contained in:
Benoit Steiner 2016-06-03 17:28:33 -07:00
commit 36a4500822

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>