Created by: sneaxiy
Add Eigen::internal::index_op<T>
support to Eigen.
Suppose x
and y
are TensorMap
s of Eigen, y.device(device) = x.nullaryExpr(Eigen::internal::index_op<int>())
would produce the sequence 0,1,2,...,numel(x)-1
.
This Eigen::internal::index_op<T>
could be used to replace broadcast()
operation in Eigen, making some op
faster.