| 766 | |
| 767 | template <typename T, typename TensorType> |
| 768 | void fill_tensor_vector(TensorType &tensor, std::vector<T> vec) |
| 769 | { |
| 770 | ARM_COMPUTE_ERROR_ON(tensor.info()->tensor_shape().total_size() != vec.size()); |
| 771 | |
| 772 | map(tensor, true); |
| 773 | |
| 774 | Window window; |
| 775 | window.use_tensor_dimensions(tensor.info()->tensor_shape()); |
| 776 | |
| 777 | int i = 0; |
| 778 | Iterator it_tensor(&tensor, window); |
| 779 | execute_window_loop( |
| 780 | window, [&](const Coordinates &) { *reinterpret_cast<T *>(it_tensor.ptr()) = vec.at(i++); }, it_tensor); |
| 781 | |
| 782 | unmap(tensor); |
| 783 | } |
| 784 | |
| 785 | template <typename T, typename TensorType> |
| 786 | void fill_random_tensor(TensorType &tensor, |