ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Block.h
Go to the documentation of this file.
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 __NEST_BLOCK_H__
18#define __NEST_BLOCK_H__
19
20#include "nest/Stmt.h"
21
22#include <vector>
23
24#include <cstdint>
25
26namespace nest
27{
28
29struct Block
30{
31public:
32 uint32_t size(void) const { return _stmts.size(); }
33
34public:
35 const Stmt &at(uint32_t n) const { return _stmts.at(n); }
36
37public:
38 void append(const Stmt &stmt) { _stmts.emplace_back(stmt); }
39
40private:
41 std::vector<Stmt> _stmts;
42};
43
44} // namespace nest
45
46#endif // __NEST_BLOCK_H__
Definition Block.h:27
std::shared_ptr< stmt::Node > Stmt
Definition Stmt.h:30
uint32_t size(void) const
Definition Block.h:32
void append(const Stmt &stmt)
Definition Block.h:38
const Stmt & at(uint32_t n) const
Definition Block.h:35