MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / for_each

Function for_each

include/cute/algorithm/tensor_algorithms.hpp:46–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45template <class Engine, class Layout, class UnaryOp>
46CUTE_HOST_DEVICE constexpr
47void
48for_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
56template <class Engine, class Layout, class UnaryOp>
57CUTE_HOST_DEVICE constexpr

Callers

nothing calls this directly

Calls 2

tensorFunction · 0.85
sizeFunction · 0.50

Tested by

no test coverage detected