DartNativeFunctions extension

on

Methods

addSessionConfigEntry(Pointer<OrtSessionOptions> options, {required String key, required String value}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

consumeErrorMessage(Pointer<OrtStatus> status) → String

Available on OrtApi, provided by the DartNativeFunctions extension

Copies the error message and releases the owned ORT status.
createCpuMemoryInfo(Pointer<Pointer<OrtMemoryInfo>> memoryInfo, {int ortAllocator = 3, int ortMemType = 0}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

Must be freed with releaseMemoryInfo.
createEnv(Pointer<Pointer<OrtEnv>> env, {int logLevel = 3, String logId = ''}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

createFloat32Tensor(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<double> values}) → Pointer<Float>

Available on OrtApi, provided by the DartNativeFunctions extension

createFloat32Tensor2D(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<List<double>> values}) → Pointer<Float>

Available on OrtApi, provided by the DartNativeFunctions extension

createFloat32Tensor2DFromInts(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<List<int>> values}) → Pointer<Float>

Available on OrtApi, provided by the DartNativeFunctions extension

createFloat32Tensor3D(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<List<List<double>>> values}) → Pointer<Float>

Available on OrtApi, provided by the DartNativeFunctions extension

createInt32Tensor(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<int> values}) → Pointer<Int32>

Available on OrtApi, provided by the DartNativeFunctions extension

You MUST call calloc.free on the returned pointer when you are done with it, i.e. once inference is complete.
createInt64Tensor(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<int> values, List<int>? shape}) → Pointer<Int64>

Available on OrtApi, provided by the DartNativeFunctions extension

You MUST call calloc.free on the returned pointer when you are done with it, i.e. once inference is complete.
createRunOptions(Pointer<Pointer<OrtRunOptions>> runOptions) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

Must be freed releaseRunOptions.
createSession({required Pointer<OrtEnv> env, required String modelPath, required Pointer<OrtSessionOptions> sessionOptions, required Pointer<Pointer<OrtSession>> session}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

createSessionOptions(Pointer<Pointer<OrtSessionOptions>> optionsPtr) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

createTensorWithDataAsOrtValue(Pointer<Pointer<OrtValue>> value, {required Pointer<OrtMemoryInfo> memoryInfo, required Pointer<Void> inputData, required int inputDataLengthInBytes, required Pointer<Int64> inputShape, required int inputShapeLengthInBytes, required int onnxTensorElementDataType}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

createUint8Tensor(Pointer<Pointer<OrtValue>> inputTensorPointer, {required Pointer<OrtMemoryInfo> memoryInfo, required List<int> values}) → Pointer<Uint8>

Available on OrtApi, provided by the DartNativeFunctions extension

You MUST call calloc.free on the returned pointer when you are done with it, i.e. once inference is complete.
getAllocatorWithDefaultOptions(Pointer<Pointer<OrtAllocator>> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getDimensionsCount(Pointer<OrtTensorTypeAndShapeInfo> info, Pointer<Size> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getErrorCodeMessage(Pointer<OrtStatus> status) → String?

Available on OrtApi, provided by the DartNativeFunctions extension

getStringTensorElement(Pointer<OrtValue> value, int stringLength, int index, Pointer<Void> s) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getStringTensorElementLength(Pointer<OrtValue> value, int index, Pointer<Size> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getTensorElementType(Pointer<OrtTensorTypeAndShapeInfo> info, Pointer<UnsignedInt> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getTensorMutableData(Pointer<OrtValue> value, Pointer<Pointer<Void>> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getTensorShapeElementCount(Pointer<OrtTensorTypeAndShapeInfo> info, Pointer<Size> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

getTensorTypeAndShape(Pointer<OrtValue> value, Pointer<Pointer<OrtTensorTypeAndShapeInfo>> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

Call releaseTensorTypeAndShapeInfo on the returned pointer when you are done with it.
registerCustomOpsLibrary(Pointer<OrtSessionOptions> options, Pointer<Char> libraryPath, Pointer<Pointer<Void>> libraryHandle) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

releaseEnv(Pointer<OrtEnv> env) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseMemoryInfo(Pointer<OrtMemoryInfo> memoryInfo) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseRunOptions(Pointer<OrtRunOptions> runOptions) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseSession(Pointer<OrtSession> session) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseSessionOptions(Pointer<OrtSessionOptions> sessionOptions) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseTensorTypeAndShapeInfo(Pointer<OrtTensorTypeAndShapeInfo> info) → void

Available on OrtApi, provided by the DartNativeFunctions extension

releaseValue(Pointer<OrtValue> value) → void

Available on OrtApi, provided by the DartNativeFunctions extension

run({required Pointer<OrtSession> session, required Pointer<OrtRunOptions> runOptions, required Pointer<Pointer<Char>> inputNames, required Pointer<Pointer<OrtValue>> inputValues, required int inputCount, required Pointer<Pointer<Char>> outputNames, required int outputCount, required Pointer<Pointer<OrtValue>> outputValues}) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

sessionGetOutputCount(Pointer<OrtSession> session) → Pointer<Size>

Available on OrtApi, provided by the DartNativeFunctions extension

You MUST call calloc.free on the returned pointer.
sessionGetOutputName(Pointer<OrtSession> session, int index, Pointer<Pointer<Char>> out) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

setInterOpNumThreads(Pointer<OrtSessionOptions> options, int interOpNumThreads) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension

setIntraOpNumThreads(Pointer<OrtSessionOptions> options, int intraOpNumThreads) → Pointer<OrtStatus>

Available on OrtApi, provided by the DartNativeFunctions extension