ONE - On-device Neural Engine
Loading...
Searching...
No Matches
CircleConcatenation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 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 __LUCI_IR_CIRCLECONCATENATION_H__
18#define __LUCI_IR_CIRCLECONCATENATION_H__
19
22
26
27#include <cassert>
28
29namespace luci
30{
31
36 : public VariadicArityNode<CircleNodeImpl<CircleOpcode::CONCATENATION>>,
37 public CircleNodeMixin<CircleNodeTrait::FusedActFunc>
38{
39public:
42 {
43 // TODO Support when arity is 0
44 assert(arity >= 1);
45 }
46
47public:
48 uint32_t numValues(void) const { return arity(); }
49
50public:
51 Node *values(uint32_t index) const
52 {
53 assert(index < numValues());
54 return at(index)->node();
55 }
56 void values(uint32_t index, Node *node)
57 {
58 assert(index < numValues());
59 at(index)->node(node);
60 }
61
62public:
63 int32_t axis(void) const { return _axis; }
64 void axis(int32_t axis) { _axis = axis; }
65
66private:
67 int32_t _axis{0};
68};
69
70} // namespace luci
71
72#endif // __LUCI_IR_CIRCLECONCATENATION_H__
Node()=default
Node * node(void) const
Definition Use.h:58
CONCATENATION in Circle.
uint32_t numValues(void) const
void values(uint32_t index, Node *node)
Node * values(uint32_t index) const
Nodes with the variadic inputs.
uint32_t arity(void) const final
Return the number of arguments.