2 #ifndef _NNDEPLOY_BASE_COMMON_H_
3 #define _NNDEPLOY_BASE_COMMON_H_
7 #include "nndeploy/base/half.hpp"
27 DataType(uint8_t code, uint8_t bits, uint16_t lanes = (uint16_t)1);
381 using ShapeMap = std::map<std::string, std::vector<int>>;
#define NNDEPLOY_CC_API
api
std::string dataFormatToString(DataFormat data_format)
std::string codecTypeToString(CodecType src)
ForwardOpType stringToForwardOpType(const std::string &src)
std::string nodeColorTypeToString(NodeColorType src)
std::string inferenceOptLevelToString(InferenceOptLevel src)
@ kInferenceTypeAITemplate
@ kInferenceTypeDiffusers
@ kInferenceTypeOnnxRuntime
@ kInferenceTypeTensorFlow
@ kInferenceTypeNotSupport
@ kInferenceTypeNeuroPilot
@ kInferenceTypePaddleLite
std::string memoryTypeToString(MemoryType src)
DataType dataTypeOf< int8_t >()
CodecType stringToCodecType(const std::string &src)
QueueOverflowPolicy stringToOverflowPolicy(const std::string &src)
DataType dataTypeOf< uint64_t >()
@ kPrecisionTypeNotSupport
std::string topoSortTypeToString(TopoSortType src)
DataType stringToDataType(const std::string &str)
std::vector< int > IntVector
EdgeType stringToEdgeType(const std::string &src)
std::map< std::string, std::vector< int > > ShapeMap
MemoryPoolType stringToMemoryPoolType(const std::string &src)
MemoryType stringToMemoryType(const std::string &src)
std::string codecFlagToString(CodecFlag src)
DataType dataTypeOf< uint8_t >()
std::string powerTypeToString(PowerType src)
PowerType stringToPowerType(const std::string &src)
InferenceOptLevel stringToInferenceOptLevel(const std::string &src)
std::string edgeUpdateFlagToString(EdgeUpdateFlag src)
DeviceTypeCode stringToDeviceTypeCode(const std::string &src)
PrecisionType stringToPrecisionType(const std::string &src)
DataFormat stringToDataFormat(const std::string &str)
TensorType stringToTensorType(const std::string &src)
@ kQueueOverflowPolicyDropOldest
@ kQueueOverflowPolicyNodeBackpressure
@ kQueueOverflowPolicyAllBackpressure
std::string tensorTypeToString(TensorType src)
PrecisionType getPrecisionType(DataType data_type)
std::string forwardOpTypeToString(ForwardOpType src)
EncryptType stringToEncryptType(const std::string &src)
@ kDataTypeCodeNotSupport
@ kDataTypeCodeOpaqueHandle
DataType dataTypeOf< uint32_t >()
std::string dataTypeToString(DataType data_type)
std::vector< size_t > SizeVector
std::string dataTypeCodeToString(DataTypeCode src)
DataType dataTypeOf< bfp16_t >()
InferenceType stringToInferenceType(const std::string &src)
std::string shareMemoryTypeToString(ShareMemoryType src)
@ kParallelTypeSequential
std::string overflowPolicyToString(QueueOverflowPolicy src)
DataType dataTypeOf< double >()
@ kMemoryPoolTypeChunkIndepend
std::string precisionTypeToString(PrecisionType src)
ModelType stringToModelType(const std::string &src)
DataTypeCode stringToDataTypeCode(const std::string &src)
DataType dataTypeOf< float >()
@ kDeviceTypeCodeSophonNpu
@ kDeviceTypeCodeAscendCL
@ kDeviceTypeCodeQualcommNpu
@ kDeviceTypeCodeNotSupport
@ kDeviceTypeCodeAppleNpu
DeviceType stringToDeviceType(const std::string &src)
std::string deviceTypeToString(DeviceType src)
ParallelType stringToParallelType(const std::string &src)
std::string inferenceTypeToString(InferenceType src)
DataType dataTypeOf< uint16_t >()
DataType dataTypeOf< int16_t >()
DataType dataTypeOf< int64_t >()
CodecFlag stringToCodecFlag(const std::string &src)
@ kShareMemoryTypeShareFromExternal
@ kShareMemoryTypeNoShare
@ kShareMemoryTypeNotSupport
@ kEdgeUpdateFlagComplete
@ kEdgeUpdateFlagTerminate
std::string parallelTypeToString(ParallelType src)
std::string deviceTypeCodeToString(DeviceTypeCode src)
EdgeUpdateFlag stringToEdgeUpdateFlag(const std::string &src)
std::string modelTypeToString(ModelType src)
std::string encryptTypeToString(EncryptType src)
ShareMemoryType stringToShareMemoryType(const std::string &src)
TopoSortType stringToTopoSortType(const std::string &src)
NodeColorType stringToNodeColorType(const std::string &src)
@ kForwardOpTypeNotSupport
std::string edgeTypeToString(EdgeType src)
std::string memoryPoolTypeToString(MemoryPoolType src)
DataType dataTypeOf< int32_t >()
DataType(DataType &&other)
DataType(uint8_t code, uint8_t bits, uint16_t lanes=(uint16_t) 1)
DataType & operator=(DataType &&other)
bool operator!=(const DataTypeCode &other) const
DataType & operator=(const DataType &other)
bool operator!=(const DataType &other) const
bool operator==(const DataType &other) const
DataType(DataTypeCode code, uint8_t bits, uint16_t lanes=(uint16_t) 1)
bool operator<(const DataType &other) const
DataType(const DataType &other)
bool operator==(const DataTypeCode &other) const
DeviceType & operator=(const DeviceTypeCode &other)
DeviceType(DeviceTypeCode code, int device_id=0)
bool operator!=(const DeviceType &other) const
bool operator==(const DeviceTypeCode &other) const
bool operator!=(const DeviceTypeCode &other) const
DeviceType & operator=(DeviceType &&other)
bool operator==(const DeviceType &other) const
DeviceType(DeviceType &&other)
DeviceType(const DeviceType &other)
DeviceType & operator=(const DeviceType &other)