File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ limitations under the License.
20
20
namespace tflite {
21
21
namespace array_internal {
22
22
23
+ #ifndef TF_LITE_STATIC_MEMORY
23
24
void TfLiteArrayDeleter::operator ()(TfLiteIntArray* a) {
24
25
if (a) {
25
26
TfLiteIntArrayFree (a);
@@ -30,6 +31,7 @@ void TfLiteArrayDeleter::operator()(TfLiteFloatArray* a) {
30
31
TfLiteFloatArrayFree (a);
31
32
}
32
33
}
34
+ #endif // TF_LITE_STATIC_MEMORY
33
35
34
36
} // namespace array_internal
35
37
} // namespace tflite
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ using FloatArrayUniquePtr = TfLiteArrayUniquePtr<float>;
70
70
template <class T = int >
71
71
TfLiteArrayUniquePtr<T> BuildTfLiteArray (int size);
72
72
73
+ #ifndef TF_LITE_STATIC_MEMORY
73
74
// Allocates a TfLiteIntArray of given size using malloc.
74
75
template <>
75
76
inline IntArrayUniquePtr BuildTfLiteArray<int >(const int size) {
@@ -81,6 +82,7 @@ template <>
81
82
inline FloatArrayUniquePtr BuildTfLiteArray<float >(const int size) {
82
83
return FloatArrayUniquePtr (TfLiteFloatArrayCreate (size));
83
84
}
85
+ #endif // TF_LITE_STATIC_MEMORY
84
86
85
87
// Allocates a TFLiteArray of given size and initializes it with the given
86
88
// values.
You can’t perform that action at this time.
0 commit comments