2017-09-22 22:26:12 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package android.hardware.neuralnetworks@1.0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IExecutionCallback must be used to return the error status result from an
|
|
|
|
* execution asynchronously launched from IPreparedModel::execute.
|
|
|
|
*/
|
|
|
|
interface IExecutionCallback {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* notify must be invoked immediately after the asynchronous task has
|
|
|
|
* finished performing the execution. notify must be provided with the
|
|
|
|
* ErrorStatus resulting from the execution. If the asynchronous task
|
|
|
|
* is not launched, notify must be invoked with the appropriate error.
|
|
|
|
*
|
2018-04-03 22:03:50 +02:00
|
|
|
* @param status Error status returned from launching the asynchronous task
|
2017-09-22 22:26:12 +02:00
|
|
|
* (if the launch fails) or from the asynchronous task itself
|
|
|
|
* (if the launch succeeds). Must be:
|
|
|
|
* - NONE if the asynchronous execution was successful
|
|
|
|
* - DEVICE_UNAVAILABLE if driver is offline or busy
|
|
|
|
* - GENERAL_FAILURE if the asynchronous task resulted in an
|
|
|
|
* unspecified error
|
|
|
|
* - OUTPUT_INSUFFICIENT_SIZE if provided output buffer is
|
|
|
|
* not large enough to store the resultant values
|
|
|
|
* - INVALID_ARGUMENT if one of the input arguments to
|
|
|
|
* prepareModel is invalid
|
|
|
|
*/
|
|
|
|
oneway notify(ErrorStatus status);
|
|
|
|
};
|