Module ffi

Source
Expand description

Re-export of whole mnn-sys

Modules§

SessionMode
cpp

Structs§

Backend
CString
Interpreter
MNNBackendConfig
MNNScheduleConfig
MemoryMode
PowerMode
PrecisionMode
Session
Tensor
TensorInfo
TensorInfoArray
TensorShape
__fsid_t
halide_buffer_t
\file
halide_device_interface_impl_t
An opaque struct containing per-GPU API implementations of the device functions.
halide_device_interface_t
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device allocations. You can access these functions directly from the struct member function pointers, or by calling the functions declared below. Note that the global functions are not available when using Halide as a JIT compiler. If you are using raw halide_buffer_t in that context you must use the function pointers in the device_interface struct.
halide_dimension_t
halide_type_t
A runtime tag for a type in the halide type system. Can be ints, unsigned ints, or floats of various bit-widths (the ‘bits’ field). Can also be vectors of the same (by setting the ‘lanes’ field to something larger than one). This struct should be exactly 32-bits in size.
max_align_t

Enums§

DimensionType
ErrorCode
HandleDataType
MNNForwardType
MNNGpuMode
MapType
RuntimeStatus
acquire runtime status by Runtime::getCurrentStatus with following keys,
halide_type_code_t
Types in the halide type system. They can be ints, unsigned ints, or floats (of various bit-widths), or a handle (which is always 64-bits). Note that the int/uint/float values do not imply a specific bit width (the bit width is expected to be encoded in a separate value).

Constants§

INT8_MAX
INT8_MIN
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
PTRDIFF_MAX
PTRDIFF_MIN
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WINT_MAX
WINT_MIN
_ATFILE_SOURCE
_BITS_STDINT_INTN_H
_BITS_STDINT_LEAST_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_FEATURES_H
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
__FD_SETSIZE
__GLIBC_MINOR__
__GLIBC_USE_C23_STRTOL
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C23
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C23
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC23
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__OFF_T_MATCHES_OFF64_T
__RLIM_T_MATCHES_RLIM64_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__SYSCALL_WORDSIZE
__TIMESIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_TIME_BITS64
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__bool_true_false_are_defined
__glibc_c99_flexarr_available
false_
halide_buffer_flags_halide_buffer_flag_device_dirty
halide_buffer_flags_halide_buffer_flag_host_dirty
true_

Traits§

HalideType

Functions§

Interpreter_bizCode
Interpreter_createFromBuffer
@brief create net from buffer. @param buffer given data buffer. @param size size of data buffer. @return created net if success, NULL otherwise.
Interpreter_createFromFile
@brief create net from file. @param file given file. @return created net if success, NULL otherwise.
Interpreter_createMultiPathSession
Interpreter_createSession
Interpreter_destroy
Interpreter_getBackend
Interpreter_getModelVersion
Interpreter_getSessionInfo
Interpreter_getSessionInput
Interpreter_getSessionInputAll
Interpreter_getSessionOutput
Interpreter_getSessionOutputAll
Interpreter_releaseModel
Interpreter_releaseSession
Interpreter_resizeSession
Interpreter_resizeSessionWithFlag
Interpreter_resizeTensor
Interpreter_resizeTensorByNCHW
Interpreter_runSession
Interpreter_runSessionWithCallBackInfo
Interpreter_setCacheFile
Interpreter_setExternalFile
Interpreter_setSessionHint
Interpreter_setSessionMode
Interpreter_updateCacheFile
Interpreter_updateSessionToModel
Interpreter_uuid
OperatorInfo_flops
OperatorInfo_name
OperatorInfo_type
Session_destroy
Session_hasAsyncWork
Tensor_batch
Tensor_buffer
Tensor_buffer_mut
Tensor_channel
Tensor_clone
Tensor_copyFromHostTensor
Tensor_copyToHostTensor
Tensor_create
Tensor_createDevice
Tensor_createFromTensor
Tensor_createHostTensorFromDevice
Tensor_createWith
Tensor_destroy
Tensor_deviceId
Tensor_dimensions
Tensor_elementSize
Tensor_getDeviceInfo
Tensor_getDimensionType
Tensor_getType
Tensor_height
Tensor_host
Tensor_host_mut
Tensor_isTypeOf
Tensor_length
Tensor_map
Tensor_print
Tensor_printShape
Tensor_setDevicePtr
Tensor_setLength
Tensor_setStride
Tensor_shape
Tensor_size
Tensor_stride
Tensor_unmap
Tensor_usize
Tensor_wait
Tensor_width
createCString
createTensorInfoArray
destroyCString
destroyTensorInfoArray
getTensorInfoArray
getVersion
@brief get mnn version info. @return mnn version string.
halide_type_of
mnnbc_clone
mnnbc_create
mnnbc_destroy
mnnbc_get_memory_mode
mnnbc_get_power_mode
mnnbc_get_precision_mode
mnnbc_reset
mnnbc_set_flags
mnnbc_set_memory_mode
mnnbc_set_power_mode
mnnbc_set_precision_mode
mnnbc_set_shared_context
mnnsc_clone
mnnsc_create
mnnsc_destroy
mnnsc_get_backup_type
mnnsc_get_type
mnnsc_set_backend_config
mnnsc_set_backup_type
mnnsc_set_mode
mnnsc_set_num_threads
mnnsc_set_save_tensors
mnnsc_set_type
modelPrintIO

Type Aliases§

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
halide_buffer_flags
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
wchar_t