xref: /aosp_15_r20/external/mesa3d/include/tensorflow/lite/core/async/c/types.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 #ifndef TENSORFLOW_LITE_CORE_ASYNC_C_TYPES_H_
16 #define TENSORFLOW_LITE_CORE_ASYNC_C_TYPES_H_
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif  // __cplusplus
21 
22 /// Opaque type for TfLiteAsyncKernel.
23 typedef struct TfLiteAsyncKernel TfLiteAsyncKernel;
24 
25 /// Opaque type for TfLiteExecutionTask.
26 ///
27 /// See tensorflow/lite/core/async/c/task.h
28 /// NOTE: TfLiteExecutionTask is NOT thread-safe.
29 typedef struct TfLiteExecutionTask TfLiteExecutionTask;
30 
31 /// Enum tag for specifying whether a tensor is the input or output to the
32 /// model.
33 typedef enum TfLiteIoType {
34   kTfLiteIoTypeUnknown = 0,
35   kTfLiteIoTypeInput = 1,
36   kTfLiteIoTypeOutput = 2,
37 } TfLiteIoType;
38 
39 #ifdef __cplusplus
40 }  // extern "C"
41 #endif  // __cplusplus
42 
43 #endif  // TENSORFLOW_LITE_CORE_ASYNC_C_TYPES_H_
44