|
10 | 10 |
|
11 | 11 | #include <c10/util/irange.h> |
12 | 12 | #include <executorch/kernels/portable/cpu/util/broadcast_indexes_range.h> |
| 13 | +#include <executorch/kernels/portable/cpu/util/delinearize_index.h> |
13 | 14 | #include <executorch/runtime/core/exec_aten/exec_aten.h> |
14 | 15 | #include <executorch/runtime/core/exec_aten/util/tensor_util.h> |
15 | 16 |
|
@@ -207,36 +208,6 @@ ET_NODISCARD inline Error resize_to_broadcast_target_size( |
207 | 208 | ET_DEPRECATED void free_broadcast_tensor( |
208 | 209 | const executorch::aten::Tensor& broadcast_tensor); |
209 | 210 |
|
210 | | -/** |
211 | | - * Delinearize a flattened index to per-dimension indexes. |
212 | | - * |
213 | | - * @param[in] linear_index The flattened index |
214 | | - * @param[in] shape The tensor shape |
215 | | - * @param[out] out_indexes The per-dimension indexes |
216 | | - * @param[in] out_indexes_len The maximum size of the out_indexes array |
217 | | - * @returns void |
218 | | - */ |
219 | | -void delinearize_index( |
220 | | - size_t linear_index, |
221 | | - executorch::aten::ArrayRef<Tensor::SizesType> shape, |
222 | | - size_t* out_indexes, |
223 | | - const size_t out_indexes_len); |
224 | | - |
225 | | -/** |
226 | | - * Delinearize a flattened index to per-dimension indexes. |
227 | | - * |
228 | | - * @param[in] linear_index The flattened index |
229 | | - * @param[in] t The tensor object |
230 | | - * @param[out] out_indexes The per-dimension indexes |
231 | | - * @param[in] out_indexes_len The maximum size of the out_indexes array |
232 | | - * @returns void |
233 | | - */ |
234 | | -void delinearize_index( |
235 | | - size_t linear_index, |
236 | | - const Tensor& t, |
237 | | - size_t* out_indexes, |
238 | | - const size_t out_indexes_len); |
239 | | - |
240 | 211 | /** |
241 | 212 | * Return the linear index for broatcast_from tensor, given the indexes and |
242 | 213 | * number of dimensions of broadcast_to tensor, and the shape and strides |
|
0 commit comments