MLContextOptions constructor

MLContextOptions({
  1. MLDeviceType? deviceType,
  2. MLPowerPreference? powerPreference,
})

Implementation

factory MLContextOptions(
        {MLDeviceType? deviceType, MLPowerPreference? powerPreference}) =>
    MLContextOptions._(
        deviceType: deviceType?.value ?? MLDeviceType.cpu.value,
        powerPreference:
            powerPreference?.value ?? MLPowerPreference.valueDefault.value);