| 88 | |
| 89 | template <typename T> |
| 90 | std::vector<SimpleTensor<T>> |
| 91 | unstack(const SimpleTensor<T> &input_tensor, std::vector<SimpleTensor<T>> &output_tensors, int axis) |
| 92 | { |
| 93 | // Wrap around negative values |
| 94 | const unsigned int axis_u = wrap_around(axis, static_cast<int>(input_tensor.shape().num_dimensions())); |
| 95 | ARM_COMPUTE_ERROR_ON(axis_u >= input_tensor.shape().num_dimensions()); |
| 96 | for (size_t k = 0; k < output_tensors.size(); ++k) |
| 97 | { |
| 98 | SimpleTensor<T> &output = output_tensors[k]; |
| 99 | const SimpleTensor<T> kth_slice = get_slice(input_tensor, axis_u, k); |
| 100 | output = copy_tensor<T>(kth_slice); |
| 101 | } |
| 102 | return output_tensors; |
| 103 | } |
| 104 | |
| 105 | template std::vector<SimpleTensor<float>> |
| 106 | unstack(const SimpleTensor<float> &input_tensor, std::vector<SimpleTensor<float>> &output_tensors, int axis); |
nothing calls this directly
no test coverage detected