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

Function transform

include/cute/algorithm/tensor_algorithms.hpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80// Similar to std::transform but does not return number of elements affected
81template <class Engine, class Layout, class UnaryOp>
82CUTE_HOST_DEVICE constexpr
83void
84transform(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
93template <class Engine, class Layout, class UnaryOp>

Callers

nothing calls this directly

Calls 6

tensorFunction · 0.85
make_transform_iterFunction · 0.85
sizeFunction · 0.50
make_tensorFunction · 0.50
dataMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected