FastDeploy  latest
Fast & Easy to Deploy!
enum_variables.h
Go to the documentation of this file.
1 // Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
2 //
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 #pragma once
16 
17 #define FD_ENUM(type) \
18  typedef int32_t type; \
19  enum
20 
21 FD_ENUM(FD_C_ModelFormat){
22  FD_C_ModelFormat_AUTOREC,
23  FD_C_ModelFormat_PADDLE,
24  FD_C_ModelFormat_ONNX,
25  FD_C_ModelFormat_RKNN,
26  FD_C_ModelFormat_TORCHSCRIPT,
27  FD_C_ModelFormat_SOPHGO,
28 };
29 
30 FD_ENUM(FD_C_rknpu2_CpuName){
31  FD_C_ModelFormat_RK356X = 0,
32  FD_C_ModelFormat_RK3588 = 1,
33  FD_C_ModelFormat_UNDEFINED,
34 };
35 
36 FD_ENUM(FD_C_rknpu2_CoreMask){
37  FD_C_ModelFormat_RKNN_NPU_CORE_AUTO = 0,
38  FD_C_ModelFormat_RKNN_NPU_CORE_0 = 1,
39  FD_C_ModelFormat_RKNN_NPU_CORE_1 = 2,
40  FD_C_ModelFormat_RKNN_NPU_CORE_2 = 4,
41  FD_C_ModelFormat_RKNN_NPU_CORE_0_1 = FD_C_ModelFormat_RKNN_NPU_CORE_0 |
42  FD_C_ModelFormat_RKNN_NPU_CORE_1,
43  FD_C_ModelFormat_RKNN_NPU_CORE_0_1_2 = FD_C_ModelFormat_RKNN_NPU_CORE_0_1 |
44  FD_C_ModelFormat_RKNN_NPU_CORE_2,
45  FD_C_ModelFormat_RKNN_NPU_CORE_UNDEFINED,
46 };
47 
48 FD_ENUM(FD_C_LitePowerMode){
49  FD_C_ModelFormat_LITE_POWER_HIGH = 0,
50  FD_C_ModelFormat_LITE_POWER_LOW = 1,
51  FD_C_ModelFormat_LITE_POWER_FULL = 2,
52  FD_C_ModelFormat_LITE_POWER_NO_BIND = 3,
53  FD_C_ModelFormat_LITE_POWER_RAND_HIGH = 4,
54  FD_C_ModelFormat_LITE_POWER_RAND_LOW = 5
55 };
56 
57 FD_ENUM(FD_C_ResultType){
58  FD_C_ModelFormat_UNKNOWN_RESULT,
59  FD_C_ModelFormat_CLASSIFY,
60  FD_C_ModelFormat_DETECTION,
61  FD_C_ModelFormat_SEGMENTATION,
62  FD_C_ModelFormat_OCR,
63  FD_C_ModelFormat_MOT,
64  FD_C_ModelFormat_FACE_DETECTION,
65  FD_C_ModelFormat_FACE_ALIGNMENT,
66  FD_C_ModelFormat_FACE_RECOGNITION,
67  FD_C_ModelFormat_MATTING,
68  FD_C_ModelFormat_MASK,
69  FD_C_ModelFormat_KEYPOINT_DETECTION,
70  FD_C_ModelFormat_HEADPOSE,
71 };
#define FD_ENUM(type)
Definition: enum_variables.h:17