ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Pass.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 NNCC_PASS_H
18#define NNCC_PASS_H
19
20#include <string>
21
22#include "pass/PassData.h"
23
24namespace nnc
25{
26
30class Pass
31{
32public:
39 virtual PassData run(PassData data) = 0;
40
44 virtual void cleanup(){};
45
46 virtual ~Pass() = default;
47
48 virtual std::string getName() { return "pass"; }
49};
50
51} // namespace nnc
52
53#endif // NNCC_PASS_H
class that encapsulate value returned and taken by pass
Definition PassData.h:30
this class represent an interface for all compiler passes like that frontend, backend etc
Definition Pass.h:31
virtual std::string getName()
Definition Pass.h:48
virtual ~Pass()=default
virtual PassData run(PassData data)=0
run compiler pass
virtual void cleanup()
clean compiler pass data
Definition Pass.h:44