MNNForwardType.h
浏览该文件的文档.
//
// MNNForwardType.h
// MNN
//
// Created by MNN on 2019/01/19.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MNNForwardType_h
#define MNNForwardType_h
typedef enum {
MNN_FORWARD_CPU = 0,
/*
Firtly find the first available backends not equal to CPU
If no other backends, use cpu
*/
MNN_FORWARD_AUTO = 4,
/*Hand write metal*/
MNN_FORWARD_METAL = 1,
/*Use IOS's MPS instead of hand-write metal, Not Support yet*/
MNN_FORWARD_MPS = 2,
/*Android / Common Device GPU API*/
MNN_FORWARD_OPENCL = 3,
MNN_FORWARD_OPENGL = 6,
MNN_FORWARD_VULKAN = 7,
/*Android 8.1's NNAPI, Not Support yet*/
MNN_FORWARD_NN = 5,
/*User can use API from Backend.hpp to add or search Backend*/
MNN_FORWARD_USER_0 = 8,
MNN_FORWARD_USER_1 = 9,
MNN_FORWARD_USER_2 = 10,
MNN_FORWARD_USER_3 = 11,
MNN_FORWARD_ALL
} MNNForwardType;
#ifdef __cplusplus
namespace MNN {
struct BackendConfig {
enum MemoryMode {
Memory_Normal = 0,
Memory_High,
Memory_Low
};
MemoryMode memory = Memory_Normal;
enum PowerMode {
Power_Normal = 0,
Power_High,
Power_Low
};
PowerMode power = Power_Normal;
enum PrecisionMode {
Precision_Normal = 0,
Precision_High,
Precision_Low
};
PrecisionMode precision = Precision_Normal;
void* sharedContext = nullptr;
};
};
#endif
#endif /* MNNForwardType_h */
MNNForwardType
MNNForwardType
Definition: MNNForwardType.h:12
MNN_FORWARD_USER_1
Definition: MNNForwardType.h:37
MNN_FORWARD_MPS
Definition: MNNForwardType.h:25
MNN_FORWARD_ALL
Definition: MNNForwardType.h:41
MNN_FORWARD_USER_3
Definition: MNNForwardType.h:39
MNN_FORWARD_AUTO
Definition: MNNForwardType.h:19
MNN_FORWARD_NN
Definition: MNNForwardType.h:33
MNN_FORWARD_CPU
Definition: MNNForwardType.h:13
MNN_FORWARD_VULKAN
Definition: MNNForwardType.h:30
MNN_FORWARD_OPENGL
Definition: MNNForwardType.h:29
MNN
Definition: AutoTime.hpp:16
MNN_FORWARD_USER_0
Definition: MNNForwardType.h:36
MNN_FORWARD_OPENCL
Definition: MNNForwardType.h:28
MNN_FORWARD_USER_2
Definition: MNNForwardType.h:38
MNN_FORWARD_METAL
Definition: MNNForwardType.h:22