| 745 | |
| 746 | template <typename T, typename TensorType> |
| 747 | void 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 | |
| 761 | template <typename T, typename TensorType> |
| 762 | void fill_tensor_zero(TensorType &tensor) |