createEnv method
Implementation
Pointer<OrtStatus> createEnv(
Pointer<Pointer<OrtEnv>> env, {
int logLevel = 3 /* OrtLoggingLevel.ORT_LOGGING_LEVEL_ERROR */,
String logId = '',
}) {
final createEnvFn =
CreateEnv.asFunction<
Pointer<OrtStatus> Function(
int,
Pointer<Char>,
Pointer<Pointer<OrtEnv>>,
)
>();
final logIdChars = logId.toNativeUtf8().cast<Char>();
try {
final status = createEnvFn(
logLevel,
logIdChars,
Pointer.fromAddress(env.address),
);
return status;
} finally {
malloc.free(logIdChars);
}
}