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

Function fill_tensor_value

utils/Utils.h:747–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745
746template <typename T, typename TensorType>
747void fill_tensor_value(TensorType &tensor, T value)
748{
749 map(tensor, true);
750
751 Window window;
752 window.use_tensor_dimensions(tensor.info()->tensor_shape());
753
754 Iterator it_tensor(&tensor, window);
755 execute_window_loop(
756 window, [&](const Coordinates &) { *reinterpret_cast<T *>(it_tensor.ptr()) = value; }, it_tensor);
757
758 unmap(tensor);
759}
760
761template <typename T, typename TensorType>
762void fill_tensor_zero(TensorType &tensor)

Callers 2

fill_tensor_zeroFunction · 0.85
do_setupMethod · 0.85

Calls 4

mapFunction · 0.85
unmapFunction · 0.85
infoMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected