1 /*
2 * Copyright (c) 2023-2024 Tomeu Vizoso <[email protected]>
3 * SPDX-License-Identifier: MIT
4 */
5
6 #include "tensorflow/lite/c/c_api.h"
7 #include "tensorflow/lite/c/common.h"
8 #include "tensorflow/lite/core/c/c_api.h"
9
10 void
TfLiteInterpreterOptionsAddDelegate(TfLiteInterpreterOptions * options,TfLiteOpaqueDelegate * delegate)11 TfLiteInterpreterOptionsAddDelegate(TfLiteInterpreterOptions *options, TfLiteOpaqueDelegate *delegate)
12 {
13 }
14
15 void
TfLiteInterpreterOptionsSetErrorReporter(TfLiteInterpreterOptions * options,void (* reporter)(void * user_data,const char * format,va_list args),void * user_data)16 TfLiteInterpreterOptionsSetErrorReporter(
17 TfLiteInterpreterOptions *options,
18 void (*reporter)(void *user_data, const char *format, va_list args),
19 void *user_data)
20 {
21 }
22
23 TfLiteInterpreter *
TfLiteInterpreterCreate(const TfLiteModel * model,const TfLiteInterpreterOptions * optional_options)24 TfLiteInterpreterCreate(
25 const TfLiteModel *model,
26 const TfLiteInterpreterOptions *optional_options)
27 {
28 return NULL;
29 }
30
31 TfLiteStatus
TfLiteInterpreterAllocateTensors(TfLiteInterpreter * interpreter)32 TfLiteInterpreterAllocateTensors(TfLiteInterpreter *interpreter)
33 {
34 return 0;
35 }
36
37 int32_t
TfLiteInterpreterGetInputTensorCount(const TfLiteInterpreter * interpreter)38 TfLiteInterpreterGetInputTensorCount(const TfLiteInterpreter *interpreter)
39 {
40 return 0;
41 }
42
43 TfLiteTensor *
TfLiteInterpreterGetInputTensor(const TfLiteInterpreter * interpreter,int32_t input_index)44 TfLiteInterpreterGetInputTensor(const TfLiteInterpreter *interpreter, int32_t input_index)
45 {
46 return NULL;
47 }
48
49 TfLiteStatus
TfLiteTensorCopyFromBuffer(TfLiteTensor * tensor,const void * input_data,size_t input_data_size)50 TfLiteTensorCopyFromBuffer(TfLiteTensor *tensor,
51 const void *input_data,
52 size_t input_data_size)
53 {
54 return 0;
55 }
56
57 TfLiteStatus
TfLiteInterpreterInvoke(TfLiteInterpreter * interpreter)58 TfLiteInterpreterInvoke(TfLiteInterpreter *interpreter)
59 {
60 return 0;
61 }
62
63 int32_t
TfLiteInterpreterGetOutputTensorCount(const TfLiteInterpreter * interpreter)64 TfLiteInterpreterGetOutputTensorCount(const TfLiteInterpreter *interpreter)
65 {
66 return 0;
67 }
68
69 const TfLiteTensor *
TfLiteInterpreterGetOutputTensor(const TfLiteInterpreter * interpreter,int32_t output_index)70 TfLiteInterpreterGetOutputTensor(const TfLiteInterpreter *interpreter, int32_t output_index)
71 {
72 return NULL;
73 }
74
75 TfLiteStatus
TfLiteTensorCopyToBuffer(const TfLiteTensor * tensor,void * output_data,size_t output_data_size)76 TfLiteTensorCopyToBuffer(const TfLiteTensor *tensor,
77 void *output_data,
78 size_t output_data_size)
79 {
80 return 0;
81 }
82
83 void
TfLiteInterpreterDelete(TfLiteInterpreter * interpreter)84 TfLiteInterpreterDelete(TfLiteInterpreter *interpreter)
85 {
86 }
87
88 void
TfLiteInterpreterOptionsDelete(TfLiteInterpreterOptions * options)89 TfLiteInterpreterOptionsDelete(TfLiteInterpreterOptions *options)
90 {
91 }
92
93 TfLiteModel *
TfLiteModelCreate(const void * model_data,size_t model_size)94 TfLiteModelCreate(const void *model_data, size_t model_size)
95 {
96 return NULL;
97 }
98
99 void
TfLiteModelDelete(TfLiteModel * model)100 TfLiteModelDelete(TfLiteModel *model)
101 {
102 }
103
104 /* FIXME: Why do we need to redeclare the prototype for this one here? */
105 TfLiteInterpreterOptions *TfLiteInterpreterOptionsCreate(void);
106
107 TfLiteInterpreterOptions *
TfLiteInterpreterOptionsCreate(void)108 TfLiteInterpreterOptionsCreate(void)
109 {
110 return NULL;
111 }
112