| 80 | // Similar to std::transform but does not return number of elements affected |
| 81 | template <class Engine, class Layout, class UnaryOp> |
| 82 | CUTE_HOST_DEVICE constexpr |
| 83 | void |
| 84 | transform(Tensor<Engine,Layout>& tensor, UnaryOp&& op) |
| 85 | { |
| 86 | CUTE_UNROLL |
| 87 | for (int i = 0; i < size(tensor); ++i) { |
| 88 | tensor(i) = op(tensor(i)); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // Accept mutable temporaries |
| 93 | template <class Engine, class Layout, class UnaryOp> |
nothing calls this directly
no test coverage detected