#[repr(C)]pub enum ResultCode {
Show 16 variants
ANEURALNETWORKS_NO_ERROR = 0,
ANEURALNETWORKS_OUT_OF_MEMORY = 1,
ANEURALNETWORKS_INCOMPLETE = 2,
ANEURALNETWORKS_UNEXPECTED_NULL = 3,
ANEURALNETWORKS_BAD_DATA = 4,
ANEURALNETWORKS_OP_FAILED = 5,
ANEURALNETWORKS_BAD_STATE = 6,
ANEURALNETWORKS_UNMAPPABLE = 7,
ANEURALNETWORKS_OUTPUT_INSUFFICIENT_SIZE = 8,
ANEURALNETWORKS_UNAVAILABLE_DEVICE = 9,
ANEURALNETWORKS_MISSED_DEADLINE_TRANSIENT = 10,
ANEURALNETWORKS_MISSED_DEADLINE_PERSISTENT = 11,
ANEURALNETWORKS_RESOURCE_EXHAUSTED_TRANSIENT = 12,
ANEURALNETWORKS_RESOURCE_EXHAUSTED_PERSISTENT = 13,
ANEURALNETWORKS_DEAD_OBJECT = 14,
INVALID_ERROR = 1_000,
}
Expand description
Result codes.
Any NNAPI function can return any result code, including result codes not currently documented. Any value other than {@link ANEURALNETWORKS_NO_ERROR} indicates a failure of some kind.
Additional information about the nature of a failure can be obtained from the device log after enabling NNAPI debugging by setting the debug.nn.vlog property to 1, e.g., by calling "adb shell setprop debug.nn.vlog 1".
Available since API level 27.
Variants§
ANEURALNETWORKS_NO_ERROR = 0
Operation was succesful.
ANEURALNETWORKS_OUT_OF_MEMORY = 1
Failure caused by not enough available memory.
ANEURALNETWORKS_INCOMPLETE = 2
Failure caused by not enough available memory.
ANEURALNETWORKS_UNEXPECTED_NULL = 3
Failure caused by unexpected null argument.
ANEURALNETWORKS_BAD_DATA = 4
Failure caused by invalid function arguments, invalid model definition, invalid execution definition or invalid data at execution time.
ANEURALNETWORKS_OP_FAILED = 5
Failure caused by failed model execution.
ANEURALNETWORKS_BAD_STATE = 6
Failure caused by object being in the wrong state.
ANEURALNETWORKS_UNMAPPABLE = 7
Failure caused by not being able to map a file into memory. This may be caused by a file descriptor not being mappable, or an AHardwareBuffer not supported by the device. Mitigate by reading its content into memory.
ANEURALNETWORKS_OUTPUT_INSUFFICIENT_SIZE = 8
Failure caused by insufficient buffer size provided to a model output.
ANEURALNETWORKS_UNAVAILABLE_DEVICE = 9
Failure caused by a device not being available.
ANEURALNETWORKS_MISSED_DEADLINE_TRANSIENT = 10
Failure because a deadline could not be met for a task, but future deadlines may still be met for the same task after a short delay.
Available since API level 30.
ANEURALNETWORKS_MISSED_DEADLINE_PERSISTENT = 11
Failure because a deadline could not be met for a task, and future deadlines will likely also not be met for the same task even after a short delay.
Available since API level 30.
ANEURALNETWORKS_RESOURCE_EXHAUSTED_TRANSIENT = 12
Failure because of a resource limitation within the driver, but future calls for the same task may still succeed after a short delay.
Available since API level 30.
ANEURALNETWORKS_RESOURCE_EXHAUSTED_PERSISTENT = 13
Failure because of a resource limitation within the driver, and future calls for the same task will likely also fail even after a short delay.
Available since API level 30.
ANEURALNETWORKS_DEAD_OBJECT = 14
Failure indicating an object is in a dead state.
Available since API level 30.
INVALID_ERROR = 1_000
This error code is not defined in NNAPI.