@@ -2057,12 +2057,12 @@ class TensorFlowLiteBindings {
2057
2057
.asFunction< void Function (ffi.Pointer <TfLiteDelegate >)> ();
2058
2058
}
2059
2059
2060
- class TfLiteModel extends ffi.Opaque {}
2060
+ final class TfLiteModel extends ffi.Opaque {}
2061
2061
2062
- class TfLiteInterpreterOptions extends ffi.Opaque {}
2062
+ final class TfLiteInterpreterOptions extends ffi.Opaque {}
2063
2063
2064
2064
/// WARNING: This is an experimental interface that is subject to change.
2065
- class TfLiteDelegate extends ffi.Struct {
2065
+ final class TfLiteDelegate extends ffi.Struct {
2066
2066
/// Data that delegate needs to identify itself. This data is owned by the
2067
2067
/// delegate. The delegate is owned in the user code, so the delegate is
2068
2068
/// responsible for deallocating this when it is destroyed.
@@ -2171,7 +2171,7 @@ abstract class TfLiteStatus {
2171
2171
2172
2172
/// Forward declare so dependent structs and methods can reference these types
2173
2173
/// prior to the struct definitions.
2174
- class TfLiteContext extends ffi.Struct {
2174
+ final class TfLiteContext extends ffi.Struct {
2175
2175
/// Number of tensors in the context.
2176
2176
@ffi .Size ()
2177
2177
external int tensors_size;
@@ -2418,9 +2418,9 @@ class TfLiteContext extends ffi.Struct {
2418
2418
2419
2419
/// Fixed size list of integers. Used for dimensions and inputs/outputs tensor
2420
2420
/// indices
2421
- class TfLiteIntArray extends ffi.Opaque {}
2421
+ final class TfLiteIntArray extends ffi.Opaque {}
2422
2422
2423
- class TfLiteTensor extends ffi.Struct {
2423
+ final class TfLiteTensor extends ffi.Struct {
2424
2424
/// The data type specification for data stored in `data` . This affects
2425
2425
/// what member of `data` union should be used.
2426
2426
@ffi .Int32 ()
@@ -2521,7 +2521,7 @@ abstract class TfLiteType {
2521
2521
}
2522
2522
2523
2523
/// A union of pointers that points to memory for a given tensor.
2524
- class TfLitePtrUnion extends ffi.Union {
2524
+ final class TfLitePtrUnion extends ffi.Union {
2525
2525
/// Do not access these members directly, if possible, use
2526
2526
/// GetTensorData<TYPE>(tensor) instead, otherwise only access .data, as other
2527
2527
/// members are deprecated.
@@ -2562,13 +2562,13 @@ class TfLitePtrUnion extends ffi.Union {
2562
2562
}
2563
2563
2564
2564
/// Half precision data type compatible with the C99 definition.
2565
- class TfLiteFloat16 extends ffi.Struct {
2565
+ final class TfLiteFloat16 extends ffi.Struct {
2566
2566
@ffi .Uint16 ()
2567
2567
external int data;
2568
2568
}
2569
2569
2570
2570
/// Single-precision complex data type compatible with the C99 definition.
2571
- class TfLiteComplex64 extends ffi.Struct {
2571
+ final class TfLiteComplex64 extends ffi.Struct {
2572
2572
/// real and imaginary parts, respectively.
2573
2573
@ffi .Float ()
2574
2574
external double re;
@@ -2578,7 +2578,7 @@ class TfLiteComplex64 extends ffi.Struct {
2578
2578
}
2579
2579
2580
2580
/// Double-precision complex data type compatible with the C99 definition.
2581
- class TfLiteComplex128 extends ffi.Struct {
2581
+ final class TfLiteComplex128 extends ffi.Struct {
2582
2582
/// real and imaginary parts, respectively.
2583
2583
@ffi .Double ()
2584
2584
external double re;
@@ -2593,7 +2593,7 @@ class TfLiteComplex128 extends ffi.Struct {
2593
2593
/// Parameters for asymmetric quantization. Quantized values can be converted
2594
2594
/// back to float using:
2595
2595
/// real_value = scale * (quantized_value - zero_point)
2596
- class TfLiteQuantizationParams extends ffi.Struct {
2596
+ final class TfLiteQuantizationParams extends ffi.Struct {
2597
2597
@ffi .Float ()
2598
2598
external double scale;
2599
2599
@@ -2628,7 +2628,7 @@ abstract class TfLiteAllocationType {
2628
2628
typedef TfLiteBufferHandle = ffi.Int ;
2629
2629
2630
2630
/// Structure specifying the quantization used by the tensor, if-any.
2631
- class TfLiteQuantization extends ffi.Struct {
2631
+ final class TfLiteQuantization extends ffi.Struct {
2632
2632
/// The type of quantization held by params.
2633
2633
@ffi .Int32 ()
2634
2634
external int type;
@@ -2651,7 +2651,7 @@ abstract class TfLiteQuantizationType {
2651
2651
2652
2652
/// Parameters used to encode a sparse tensor. For detailed explanation of each
2653
2653
/// field please refer to lite/schema/schema.fbs.
2654
- class TfLiteSparsity extends ffi.Struct {
2654
+ final class TfLiteSparsity extends ffi.Struct {
2655
2655
external ffi.Pointer <TfLiteIntArray > traversal_order;
2656
2656
2657
2657
external ffi.Pointer <TfLiteIntArray > block_map;
@@ -2663,7 +2663,7 @@ class TfLiteSparsity extends ffi.Struct {
2663
2663
}
2664
2664
2665
2665
/// Metadata to encode each dimension in a sparse tensor.
2666
- class TfLiteDimensionMetadata extends ffi.Struct {
2666
+ final class TfLiteDimensionMetadata extends ffi.Struct {
2667
2667
@ffi .Int32 ()
2668
2668
external int format;
2669
2669
@@ -2684,7 +2684,7 @@ abstract class TfLiteDimensionType {
2684
2684
/// A structure representing an instance of a node.
2685
2685
/// This structure only exhibits the inputs, outputs, user defined data and some
2686
2686
/// node properties (like statefulness), not other features like the type.
2687
- class TfLiteNode extends ffi.Struct {
2687
+ final class TfLiteNode extends ffi.Struct {
2688
2688
/// Inputs to this node expressed as indices into the simulator's tensors.
2689
2689
external ffi.Pointer <TfLiteIntArray > inputs;
2690
2690
@@ -2724,7 +2724,7 @@ class TfLiteNode extends ffi.Struct {
2724
2724
external bool might_have_side_effect;
2725
2725
}
2726
2726
2727
- class TfLiteRegistration extends ffi.Struct {
2727
+ final class TfLiteRegistration extends ffi.Struct {
2728
2728
/// Initializes the op from serialized data.
2729
2729
/// Called only *once* for the lifetime of the op, so any one-time allocations
2730
2730
/// should be made here (unless they depend on tensor sizes).
@@ -2810,14 +2810,14 @@ class TfLiteRegistration extends ffi.Struct {
2810
2810
external ffi.Pointer <TfLiteRegistrationExternal > registration_external;
2811
2811
}
2812
2812
2813
- class TfLiteRegistrationExternal extends ffi.Opaque {}
2813
+ final class TfLiteRegistrationExternal extends ffi.Opaque {}
2814
2814
2815
2815
/// An external context is a collection of information unrelated to the TF Lite
2816
2816
/// framework, but useful to a subset of the ops. TF Lite knows very little
2817
2817
/// about the actual contexts, but it keeps a list of them, and is able to
2818
2818
/// refresh them if configurations like the number of recommended threads
2819
2819
/// change.
2820
- class TfLiteExternalContext extends ffi.Struct {
2820
+ final class TfLiteExternalContext extends ffi.Struct {
2821
2821
@ffi .Int32 ()
2822
2822
external int type;
2823
2823
@@ -2852,7 +2852,7 @@ abstract class TfLiteExternalContextType {
2852
2852
/// `TfLiteNode` of the delegate node.
2853
2853
///
2854
2854
/// See also the `CreateDelegateParams` function in `interpreter.cc` details.
2855
- class TfLiteDelegateParams extends ffi.Struct {
2855
+ final class TfLiteDelegateParams extends ffi.Struct {
2856
2856
external ffi.Pointer <TfLiteDelegate > delegate;
2857
2857
2858
2858
external ffi.Pointer <TfLiteIntArray > nodes_to_replace;
@@ -2866,7 +2866,7 @@ class TfLiteDelegateParams extends ffi.Struct {
2866
2866
/// of information required for a kernel to run during TfLiteRegistration::Eval.
2867
2867
/// TODO(b/160955687): Move this field into TF_LITE_STATIC_MEMORY when TFLM
2868
2868
/// builds with this flag by default internally.
2869
- class TfLiteEvalTensor extends ffi.Struct {
2869
+ final class TfLiteEvalTensor extends ffi.Struct {
2870
2870
/// A union of data pointers. The appropriate type should be used for a typed
2871
2871
/// tensor based on `type` .
2872
2872
external TfLitePtrUnion data;
@@ -2891,7 +2891,7 @@ class TfLiteEvalTensor extends ffi.Struct {
2891
2891
/// the same as with `TfLiteDelegate` .
2892
2892
///
2893
2893
/// WARNING: This is an experimental interface that is subject to change.
2894
- class TfLiteOpaqueDelegateBuilder extends ffi.Struct {
2894
+ final class TfLiteOpaqueDelegateBuilder extends ffi.Struct {
2895
2895
/// Data that delegate needs to identify itself. This data is owned by the
2896
2896
/// delegate. The delegate is owned in the user code, so the delegate is
2897
2897
/// responsible for deallocating this when it is destroyed.
@@ -2939,13 +2939,13 @@ class TfLiteOpaqueDelegateBuilder extends ffi.Struct {
2939
2939
external int flags;
2940
2940
}
2941
2941
2942
- class TfLiteOpaqueContext extends ffi.Opaque {}
2942
+ final class TfLiteOpaqueContext extends ffi.Opaque {}
2943
2943
2944
- class TfLiteOpaqueDelegateStruct extends ffi.Opaque {}
2944
+ final class TfLiteOpaqueDelegateStruct extends ffi.Opaque {}
2945
2945
2946
- class TfLiteOpaqueTensor extends ffi.Opaque {}
2946
+ final class TfLiteOpaqueTensor extends ffi.Opaque {}
2947
2947
2948
- class TfLiteInterpreter extends ffi.Opaque {}
2948
+ final class TfLiteInterpreter extends ffi.Opaque {}
2949
2949
2950
2950
/// The enum for builtin operators.
2951
2951
/// Note: CUSTOM, DELEGATE, and PLACEHOLDER_FOR_GREATER_OP_CODES are 3 special
@@ -3112,18 +3112,18 @@ abstract class TfLiteBuiltinOperator {
3112
3112
static const int kTfLiteBuiltinSign = 158 ;
3113
3113
}
3114
3114
3115
- class TfLiteOpaqueNode extends ffi.Opaque {}
3115
+ final class TfLiteOpaqueNode extends ffi.Opaque {}
3116
3116
3117
3117
typedef va_list = __builtin_va_list;
3118
3118
typedef __builtin_va_list = ffi.Pointer <ffi.Char >;
3119
3119
3120
- class TfLiteSignatureRunner extends ffi.Opaque {}
3120
+ final class TfLiteSignatureRunner extends ffi.Opaque {}
3121
3121
3122
3122
/// Old version of `TfLiteRegistration` to maintain binary backward
3123
3123
/// compatibility.
3124
3124
/// WARNING: This structure is deprecated / not an official part of the API.
3125
3125
/// It should be only used for binary backward compatibility.
3126
- class TfLiteRegistration_V1 extends ffi.Struct {
3126
+ final class TfLiteRegistration_V1 extends ffi.Struct {
3127
3127
external ffi.Pointer <
3128
3128
ffi.NativeFunction <
3129
3129
ffi.Pointer <ffi.Void > Function (ffi.Pointer <TfLiteContext > context,
@@ -3167,7 +3167,7 @@ abstract class TfLiteCoreMlDelegateEnabledDevices {
3167
3167
static const int TfLiteCoreMlDelegateAllDevices = 1 ;
3168
3168
}
3169
3169
3170
- class TfLiteCoreMlDelegateOptions extends ffi.Struct {
3170
+ final class TfLiteCoreMlDelegateOptions extends ffi.Struct {
3171
3171
/// Only create delegate when Neural Engine is available on the device.
3172
3172
@ffi .Int32 ()
3173
3173
external int enabled_devices;
@@ -3211,7 +3211,7 @@ abstract class TFLGpuDelegateWaitType {
3211
3211
3212
3212
/// Creates a new delegate instance that need to be destroyed with
3213
3213
/// DeleteFlowDelegate when delegate is no longer used by tflite.
3214
- class TFLGpuDelegateOptions extends ffi.Struct {
3214
+ final class TFLGpuDelegateOptions extends ffi.Struct {
3215
3215
/// Allows to quantify tensors, downcast values, process in float16 etc.
3216
3216
@ffi .Bool ()
3217
3217
external bool allow_precision_loss;
@@ -3224,9 +3224,9 @@ class TFLGpuDelegateOptions extends ffi.Struct {
3224
3224
external bool enable_quantization;
3225
3225
}
3226
3226
3227
- class TfLiteXNNPackDelegateWeightsCache extends ffi.Opaque {}
3227
+ final class TfLiteXNNPackDelegateWeightsCache extends ffi.Opaque {}
3228
3228
3229
- class TfLiteXNNPackDelegateOptions extends ffi.Struct {
3229
+ final class TfLiteXNNPackDelegateOptions extends ffi.Struct {
3230
3230
/// Number of threads to use in the thread pool.
3231
3231
/// 0 or negative value means no thread pool used.
3232
3232
@ffi .Int32 ()
@@ -3300,7 +3300,7 @@ abstract class TfLiteGpuExperimentalFlags {
3300
3300
/// IMPORTANT: Always use TfLiteGpuDelegateOptionsV2Default() method to create
3301
3301
/// new instance of TfLiteGpuDelegateOptionsV2, otherwise every new added option
3302
3302
/// may break inference.
3303
- class TfLiteGpuDelegateOptionsV2 extends ffi.Struct {
3303
+ final class TfLiteGpuDelegateOptionsV2 extends ffi.Struct {
3304
3304
/// When set to zero, computations are carried out in maximal possible
3305
3305
/// precision. Otherwise, the GPU may quantify tensors, downcast values,
3306
3306
/// process in FP16 to increase performance. For most models precision loss is
0 commit comments