• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef CPP_ABCKIT_STATIC_ISA_H
17 #define CPP_ABCKIT_STATIC_ISA_H
18 
19 #include <memory>
20 
21 namespace abckit {
22 
23 class Graph;
24 
25 /**
26  * @brief DynamicIsa class containing API's for dynamic ISA manipulation
27  */
28 class StaticIsa final {
29     // To access private constructor.
30     // We restrict constructors in order to prevent C/C++ API mix-up by user.
31     /// @brief To access private constructor
32     friend class Graph;
33 
34 public:
35     /**
36      * @brief Deleted constructor
37      * @param other
38      */
39     StaticIsa(const StaticIsa &other) = delete;
40 
41     /**
42      * @brief Deleted constructor
43      * @param other
44      */
45     StaticIsa &operator=(const StaticIsa &other) = delete;
46 
47     /**
48      * @brief Deleted constructor
49      * @param other
50      */
51     StaticIsa(StaticIsa &&other) = delete;
52 
53     /**
54      * @brief Deleted constructor
55      * @param other
56      */
57     StaticIsa &operator=(StaticIsa &&other) = delete;
58 
59     /**
60      * @brief Destructor
61      */
62     ~StaticIsa() = default;
63 
64 private:
65     // All static methods impl
StaticIsa(const Graph & graph)66     explicit StaticIsa(const Graph &graph) : graph_(graph) {};
67     // NOTE(nsizov): remove maybe unused, use graph_
68     [[maybe_unused]] const Graph &graph_;
69 };
70 
71 }  // namespace abckit
72 
73 #endif  // CPP_ABCKIT_STATIC_ISA_H
74