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

Function fill_tensor

tests/validation/NEON/LSTMLayerQuantized.cpp:48–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

TEST_CASEFunction · 0.70

Calls 5

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

Tested by

no test coverage detected