32 const int unextended_input_size = unextended_input_shape.
dimensionsCount();
33 const int unextended_output_size = unextended_output_shape.
dimensionsCount();
35 const int input_ext_size = N - unextended_input_size;
36 const int output_ext_size = N - unextended_output_size;
47 for (
int i = 0; i < N; ++i)
49 extended_perm[i] = i < output_ext_size ? i : params.
perm[i - output_ext_size] + input_ext_size;
55 for (
int k = 0; k < N; ++k)
62 auto tranpose_func = [&](
int indexes[N]) {
66 NDOpsHelper<N>(output_desc, tranpose_func);
80 TransposeImpl<int8_t, N>(params, unextended_input_shape,
81 reinterpret_cast<const int8_t *
>(input_data),
82 unextended_output_shape,
reinterpret_cast<int8_t *
>(output_data));
85 TransposeImpl<int16_t, N>(params, unextended_input_shape,
86 reinterpret_cast<const int16_t *
>(input_data),
87 unextended_output_shape,
reinterpret_cast<int16_t *
>(output_data));
91 TransposeImpl<int32_t, N>(params, unextended_input_shape,
92 reinterpret_cast<const int32_t *
>(input_data),
93 unextended_output_shape,
reinterpret_cast<int32_t *
>(output_data));
96 TransposeImpl<int64_t, N>(params, unextended_input_shape,
97 reinterpret_cast<const int64_t *
>(input_data),
98 unextended_output_shape,
reinterpret_cast<int64_t *
>(output_data));
void TransposeImpl(const TransposeParams ¶ms, const luci_interpreter::RuntimeShape &unextended_input_shape, const T *input_data, const luci_interpreter::RuntimeShape &unextended_output_shape, T *output_data)
void Transpose(const TransposeParams ¶ms, const luci_interpreter::RuntimeShape &unextended_input_shape, const T *input_data, const luci_interpreter::RuntimeShape &unextended_output_shape, T *output_data)