Imported Upstream version 1.4.0
[platform/core/ml/nnfw.git] / runtime / contrib / pure_arm_compute / src / internal / op / BatchToSpaceNd.h
1 /*
2  * Copyright (c) 2018 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
17 #ifndef __INTERNAL_OP_BATCHTOSPACE_ND_H__
18 #define __INTERNAL_OP_BATCHTOSPACE_ND_H__
19
20 #include "internal/op/Node.h"
21
22 #include <cstdint>
23
24 namespace internal
25 {
26 namespace tflite
27 {
28 namespace op
29 {
30 namespace BatchToSpaceNd
31 {
32
33 struct Param
34 {
35   int32_t output_index;
36
37   int32_t input_index;
38   int32_t block_size_index;
39
40   Param() = default;
41   Param(uint32_t inputCount, const uint32_t *inputs, uint32_t outputCount, const uint32_t *outputs);
42 };
43
44 } // namespace BatchToSpaceNd
45 } // namespace op
46 } // namespace tflite
47 } // namespace internal
48
49 namespace internal
50 {
51 namespace tflite
52 {
53 namespace op
54 {
55 namespace BatchToSpaceNd
56 {
57 class Node final : public op::Node
58 {
59 public:
60   Node(const Param &param) : _param(param)
61   {
62     // DO NOTHING
63   }
64
65 public:
66   virtual ~Node() = default;
67
68 public:
69   const Param &param(void) const { return _param; }
70
71 public:
72   void accept(NodeVisitor &&) const override;
73
74 private:
75   const Param _param;
76 };
77
78 } // namespace BatchToSpaceNd
79 } // namespace op
80 } // namespace tflite
81 } // namespace internal
82
83 #endif // __INTERNAL_OP_BATCHTOSPACE_Nd_H__