1/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15#ifndef TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_
16#define TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_
17
18#include <complex>
19#include <string>
20
21#include "tensorflow/lite/c/common.h"
22
23// Most of the definitions have been moved to this subheader so that Micro
24// can include it without relying on <string> and <complex>, which isn't
25// available on all platforms.
26#include "tensorflow/lite/portable_type_to_tflitetype.h"
27
28namespace tflite {
29
30// TODO(b/163167649): This string conversion means that only the first entry
31// in a string tensor will be returned as a std::string, so it's deprecated.
32MATCH_TYPE_AND_TFLITE_TYPE(std::string, kTfLiteString);
33
34MATCH_TYPE_AND_TFLITE_TYPE(std::complex<float>, kTfLiteComplex64);
35MATCH_TYPE_AND_TFLITE_TYPE(std::complex<double>, kTfLiteComplex128);
36
37} // namespace tflite
38#endif // TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_
39