ONE - On-device Neural Engine
Loading...
Searching...
No Matches
BatchToSpaceND.cpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
18#include "PALBatchToSpaceND.h"
19
20using namespace onert_micro;
21using namespace onert_micro::execute;
22
23OMStatus onert_micro::execute::execute_kernel_CircleBatchToSpaceND(
24 const onert_micro::execute::OMExecuteArgs &execute_args)
25{
26 auto batch_to_space_float_lambda =
27 [](const core::OMRuntimeShape &input1_shape, const float *input1_data,
28 const core::OMRuntimeShape &input2_shape, const int32_t *block_shape_data,
29 const core::OMRuntimeShape &input3_shape, const int32_t *crops_data,
31 return pal::BatchToSpaceND<float>(input1_shape, input1_data, input2_shape, block_shape_data,
32 input3_shape, crops_data, output_shape, output_data);
33 };
34
35 return execute_spaces_batches_nd_common(execute_args, batch_to_space_float_lambda);
36}
const luci_interpreter::RuntimeShape output_shape
OMStatus execute_spaces_batches_nd_common(const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::OMRuntimeShape &unextended_input1_shape, const float *input1_data, const core::OMRuntimeShape &unextended_input2_shape, const int32_t *block_shape_data, const core::OMRuntimeShape &unextended_input3_shape, const int32_t *crops_data, const core::OMRuntimeShape &unextended_output_shape, float *output_data)> &f)