43 assert(axis_value < split_dimensions);
46 int64_t outer_size = 1;
47 for (uint32_t i = 0; i < axis_value; ++i)
49 outer_size *= input_shape.
dims(i);
52 int64_t base_inner_size = 1;
53 for (uint32_t i = axis_value + 1; i < split_dimensions; ++i)
55 base_inner_size *= input_shape.
dims(i);
58 assert(input_data !=
nullptr);
59 for (int64_t k = 0; k < outer_size; ++k)
61 for (uint32_t i = 0; i < output_count; ++i)
63 T *output_data = core::utils::castOutputData<T>(params.
output_data[i]);
64 assert(output_data !=
nullptr);
66 T *output_ptr = output_data + k * copy_size;
67 assert(output_ptr !=
nullptr);
68 for (int64_t j = 0; j < copy_size; ++j)
69 output_ptr[j] = input_data[j];
70 input_data += copy_size;
OMStatus Split(const core::SplitParams ¶ms, const core::OMRuntimeShape &input_shape, const T *input_data, const core::OMRuntimeShape &output_shape, int32_t axis_value)