Documentation ¶
Index ¶
- Variables
- func GetModelGasFromGraphFile(lib *LibCVM, json []byte) (gas uint64, status int)
- func SwitchEndian(data []byte, bytes int) ([]byte, error)
- func ToAlignedData(data []byte, bytes int) ([]byte, error)
- type LibCVM
- func (l *LibCVM) FreeModel(net unsafe.Pointer) int
- func (l *LibCVM) GetGasFromGraphFile(json []byte) (uint64, int)
- func (l *LibCVM) GetGasFromModel(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetInputLength(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetInputTypeSize(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetOutputLength(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetOutputTypeSize(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetPreprocessMethod(net unsafe.Pointer) ([34]byte, int)
- func (l *LibCVM) GetStorageSize(net unsafe.Pointer) (uint64, int)
- func (l *LibCVM) GetVersion(net unsafe.Pointer) ([34]byte, int)
- func (l *LibCVM) Inference(net unsafe.Pointer, input []byte) ([]byte, int)
- func (l *LibCVM) LoadModel(modelCfg, modelBin []byte, deviceType, deviceId int) (unsafe.Pointer, int)
- type Model
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SUCCEED = int(C.SUCCEED) ERROR_LOGIC = int(C.ERROR_LOGIC) ERROR_RUNTIME = int(C.ERROR_RUNTIME) )
Functions ¶
Types ¶
type LibCVM ¶
type LibCVM struct {
// contains filtered or unexported fields
}
func (*LibCVM) GetGasFromGraphFile ¶
func (*LibCVM) GetInputTypeSize ¶
func (*LibCVM) GetOutputTypeSize ¶
func (*LibCVM) GetPreprocessMethod ¶
func (*LibCVM) GetVersion ¶
version and method string length not greater than 32
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) GetInputLength ¶
Click to show internal directories.
Click to hide internal directories.