MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / fill_tensor

Function fill_tensor

tests/validation/CL/LSTMLayerQuantized.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44{
45template <typename T>
46inline void fill_tensor(CLTensor &tensor, const std::vector<T> &v)
47{
48 tensor.map(true);
49 // Import memory accounting for padding
50 TensorShape t_shape = tensor.info()->tensor_shape();
51 Window window;
52 window.use_tensor_dimensions(t_shape);
53 Iterator out(&tensor, window);
54 execute_window_loop(
55 window, [&](const Coordinates &id) { *reinterpret_cast<T *>(out.ptr()) = v[coord2index(t_shape, id)]; }, out);
56 tensor.unmap();
57}
58
59template <typename T>
60inline void fill_tensor(SimpleTensor<T> &tensor, const std::vector<T> &v)

Callers 1

TEST_CASEFunction · 0.70

Calls 7

coord2indexFunction · 0.85
mapMethod · 0.45
infoMethod · 0.45
ptrMethod · 0.45
unmapMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected