| 44 | |
| 45 | template <class Engine, class Layout, class UnaryOp> |
| 46 | CUTE_HOST_DEVICE constexpr |
| 47 | void |
| 48 | for_each(Tensor<Engine,Layout> const& tensor, UnaryOp&& op) |
| 49 | { |
| 50 | CUTE_UNROLL |
| 51 | for (int i = 0; i < size(tensor); ++i) { |
| 52 | op(tensor(i)); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | template <class Engine, class Layout, class UnaryOp> |
| 57 | CUTE_HOST_DEVICE constexpr |