• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 AIE_PLUGIN_INFO_H
17 #define AIE_PLUGIN_INFO_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "utils/aie_macros.h"
23 
24 namespace OHOS {
25 namespace AI {
26 const std::string ALGORITHM_ID_SAMPLE_1 = "sample_plugin_1";
27 const std::string ALGORITHM_ID_SAMPLE_2 = "sample_plugin_2";
28 const std::string ALGORITHM_ID_KWS = "asr_keyword_spotting";
29 const std::string ALGORITHM_ID_IC = "cv_image_classification";
30 const std::string ALGORITHM_ID_RC = "cv_card_rectification";
31 const std::string ALGORITHM_ID_INVALID = "invalid algorithm id";
32 
33 // Defines the key value of the table field in the .ini file.
34 const std::string ALGORITHM_INFO_TABLE = "AlgorithmInfo";
35 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_AID = "AID";
36 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_VERSION_CODE = "VersionCode";
37 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_VERSION_NAME = "VersionName";
38 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_XPU = "XPU";
39 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_CHIPSET = "Chipset";
40 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_DISTRICT = "District";
41 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_FULLPATH = "FullPath";
42 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_CHKSUM = "ChkSum";
43 const std::string ALGORITHM_INFO_TABLE_FIELD_NAME_KEY = "Key";
44 
45 const std::vector<std::string> ALGORITHM_TYPE_ID_LIST = {
46     ALGORITHM_ID_SAMPLE_1,
47     ALGORITHM_ID_SAMPLE_2,
48     ALGORITHM_ID_KWS,
49     ALGORITHM_ID_IC,
50     ALGORITHM_ID_RC,
51 };
52 
53 /**
54  * Get algorithm id by algorithm type
55  *
56  * @param [in] type Algorithm type
57  * @return Algorithm id
58  */
59 const std::string GetAlgorithmIdByType(int type);
60 } // namespace AI
61 } // namespace OHOS
62 #endif // AIE_PLUGIN_INFO_H
63