31 std::vector<const Scalar *> &input_data,
34 int axis = params.
axis;
38 int64_t concat_size = 0;
39 for (
int i = 0; i < inputs_count; i++)
41 concat_size += input_shapes[i];
43 int64_t outer_size = 1;
44 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] * 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;
OMStatus Concatenation(core::ConcatenationParams ¶ms, std::vector< uint32_t > &input_shapes, std::vector< const Scalar * > &input_data, const core::OMRuntimeShape &output_shape, Scalar *output_data)