• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17package android.hardware.neuralnetworks@1.2;
18
19import @1.0::ErrorStatus;
20
21/**
22 * Callback object used by a service to retreive memory objects based on unique
23 * identifiers ("slots").
24 */
25interface IBurstCallback {
26    /**
27     * Get the memory regions that correspond to slot ids. The slot ids are
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};
42