allocate static method
Pointer<TfLiteGpuDelegateOptionsV2>
allocate(
- bool isPrecisionLossAllowed,
- TfLiteGpuInferenceUsage inferencePreference,
- TfLiteGpuInferencePriority inferencePriority1,
- TfLiteGpuInferencePriority inferencePriority2,
- TfLiteGpuInferencePriority inferencePriority3,
Implementation
static Pointer<TfLiteGpuDelegateOptionsV2> allocate(
bool isPrecisionLossAllowed,
TfLiteGpuInferenceUsage inferencePreference,
TfLiteGpuInferencePriority inferencePriority1,
TfLiteGpuInferencePriority inferencePriority2,
TfLiteGpuInferencePriority inferencePriority3) {
final result = calloc<TfLiteGpuDelegateOptionsV2>();
result.ref
..isPrecisionLossAllowed = isPrecisionLossAllowed ? 1 : 0
..inferencePreference = inferencePreference.index
..inferencePriority1 = inferencePriority1.index
..inferencePriority2 = inferencePriority2.index
..inferencePriority3 = inferencePriority3.index;
return result;
}