allocate static method

Pointer<TFLGpuDelegateOptions> allocate(
  1. bool allowPrecisionLoss,
  2. TFLGpuDelegateWaitType waitType,
  3. bool enableQuantization
)

Implementation

static Pointer<TFLGpuDelegateOptions> allocate(
  bool allowPrecisionLoss,
  TFLGpuDelegateWaitType waitType,
  bool enableQuantization,
) {
  final result = calloc<TFLGpuDelegateOptions>();
  result.ref
    ..allowPrecisionLoss = allowPrecisionLoss ? 1 : 0
    ..waitType = waitType.index
    ..enableQuantization = enableQuantization ? 1 : 0;
  return result;
}