AccelerationPreference class
Hardware acceleration preference for inference. Canonical single enum —
previously duplicated as AcceleratorPreference (ANE/GPU/CPU/AUTO) in this
file and AccelerationPreference in model_types.proto. Consolidated here
because it is a pure hardware concept and
hardware_profile.proto has no imports (model_types.proto already imports
this file — placing the enum here avoids a cyclic import). Sources pre-IDL:
Web enums.ts:165 (Auto / WebGPU / CPU)
Swift extensions (CPU / GPU / NPU / Metal)
Kotlin enum (CPU / GPU / NPU / Vulkan)
Canonicalized union below.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
This enum's name, as specified in the .proto file.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
This enum's integer value, as specified in the .proto file.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns this enum's
nameor thevalueif names are not represented.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
valueOf(
int value) → AccelerationPreference?
Constants
- ACCELERATION_PREFERENCE_AUTO → const AccelerationPreference
- ACCELERATION_PREFERENCE_CPU → const AccelerationPreference
- ACCELERATION_PREFERENCE_GPU → const AccelerationPreference
- ACCELERATION_PREFERENCE_METAL → const AccelerationPreference
- ACCELERATION_PREFERENCE_NPU → const AccelerationPreference
- ACCELERATION_PREFERENCE_UNSPECIFIED → const AccelerationPreference
- ACCELERATION_PREFERENCE_VULKAN → const AccelerationPreference
- ACCELERATION_PREFERENCE_WEBGPU → const AccelerationPreference
-
values
→ const List<
AccelerationPreference>