Michael Butler | 7e91e24 | 2019-01-15 10:52:41 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.neuralnetworks@1.2; |
| 18 | |
| 19 | import @1.0::ErrorStatus; |
| 20 | |
| 21 | /** |
| 22 | * Callback object used by a service to retreive memory objects based on unique |
| 23 | * identifiers ("slots"). |
| 24 | */ |
| 25 | interface IBurstCallback { |
| 26 | /** |
Michael Butler | f1ca675 | 2019-04-16 15:04:32 -0700 | [diff] [blame] | 27 | * Get the memory regions that correspond to slot ids. The slot ids are |
Michael Butler | 7e91e24 | 2019-01-15 10:52:41 -0800 | [diff] [blame] | 28 | * unique to the burst object. |
| 29 | * |
| 30 | * @param slots Values uniquely identifying memory regions within a Burst. |
| 31 | * @return status Indicates whether the memories were successfully returned; |
| 32 | * must be: |
| 33 | * - NONE if the memory region was successfully retrieved |
| 34 | * - GENERAL_FAILURE if there is an unspecified error |
| 35 | * - INVALID_ARGUMENT if a slot number is invalid |
| 36 | * @return buffers Memory buffers corresponding to the slot numbers. If an |
| 37 | * error occurs, an empty vector must be returned for |
| 38 | * buffers, otherwise slots.size() == buffers.size(). |
| 39 | */ |
| 40 | getMemories(vec<int32_t> slots) generates (ErrorStatus status, vec<memory> buffers); |
| 41 | }; |