30 const Scalar *
const *input_data,
33 int axis = params.
axis;
37 int64_t concat_size = 0;
38 for (
int i = 0; i < inputs_count; i++)
40 concat_size += input_shapes[i]->
dims(axis);
42 int64_t outer_size = 1;
43 for (
int i = 0; i < axis; ++i)
49 int64_t base_inner_size = 1;
50 for (
int i = axis + 1; i < concat_dimensions; ++i)
55 Scalar *output_ptr = output_data;
56 for (
int k = 0; k < outer_size; k++)
58 for (
int i = 0; i < inputs_count; ++i)
60 const int copy_size = input_shapes[i]->
dims(axis) * base_inner_size;
61 const Scalar *input_ptr = input_data[i] + k * copy_size;
62 memcpy(output_ptr, input_ptr, copy_size *
sizeof(Scalar));
63 output_ptr += copy_size;
void Concatenation(const ConcatenationParams ¶ms, const luci_interpreter::RuntimeShape *const *input_shapes, const Scalar *const *input_data, const luci_interpreter::RuntimeShape &output_shape, Scalar *output_data)