31 std::vector<nnfw::cker::Shape> &output_shapes, Scalar *
const *output_data)
34 int axis = params.
axis < 0 ? params.
axis + split_dimensions : params.
axis;
37 for (
int i = 0; i < outputs_count; i++)
40 for (
int j = 0; j < split_dimensions; j++)
49 int64_t outer_size = 1;
50 for (
int i = 0; i < axis; ++i)
52 outer_size *= input_shape.
Dims(i);
56 int64_t base_inner_size = 1;
57 for (
int i = axis + 1; i < split_dimensions; ++i)
59 base_inner_size *= input_shape.
Dims(i);
62 const Scalar *input_ptr = input_data;
64 for (
int k = 0; k < outer_size; k++)
66 for (
int i = 0; i < outputs_count; ++i)
68 copy_size = output_shapes[i].Dims(axis) * base_inner_size;
69 memcpy(output_data[i] + k * copy_size, input_ptr, copy_size *
sizeof(Scalar));
70 input_ptr += copy_size;
void SplitV(const SplitVParams ¶ms, const Shape &input_shape, const Scalar *input_data, std::vector< nnfw::cker::Shape > &output_shapes, Scalar *const *output_data)