From 27cc0c9a6570cf6cebce3de127f1f0e5005bbd6b Mon Sep 17 00:00:00 2001 From: Dero Gharibian Date: Thu, 1 Aug 2019 17:53:27 -0700 Subject: [PATCH] Remap DT_STRING from string to tstring. Moved tstring.h to platform/. See: https://github.com/tensorflow/community/pull/91 PiperOrigin-RevId: 261235273 --- tensorflow/core/BUILD | 9 ++++++++- tensorflow/core/framework/types.h | 2 +- tensorflow/core/{framework => platform}/tstring.h | 6 +++--- tensorflow/core/platform/types.h | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) rename tensorflow/core/{framework => platform}/tstring.h (85%) diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 301871d4f57..313360377db 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -339,6 +339,7 @@ filegroup( "platform/logging.h", "platform/macros.h", "platform/platform_strings.h", + "platform/tstring.h", "platform/types.h", ], visibility = ["//visibility:private"], @@ -711,6 +712,7 @@ cc_library( "platform/macros.h", "platform/platform.h", "platform/protobuf.h", + "platform/tstring.h", "platform/types.h", "platform/windows/cpu_info.h", "lib/bfloat16/bfloat16.h", @@ -941,7 +943,6 @@ tf_cuda_library( "example/feature_util.h", "framework/allocator.h", "framework/bounds_check.h", - "framework/tstring.h", "framework/variant.h", "framework/variant_encode_decode.h", "framework/variant_op_registry.h", @@ -1197,6 +1198,7 @@ cc_library( "platform/prefetch.h", "platform/protobuf.h", "platform/thread_annotations.h", + "platform/tstring.h", "platform/types.h", "platform/cpu_info.h", ] + if_windows(["platform/windows/integral_types.h"]), @@ -2661,6 +2663,7 @@ cc_library( "platform/macros.h", "platform/platform.h", "platform/png.h", + "platform/tstring.h", "platform/types.h", ], copts = tf_copts(), @@ -2688,6 +2691,7 @@ cc_library( "platform/logging.h", "platform/macros.h", "platform/platform.h", + "platform/tstring.h", "platform/types.h", ], copts = tf_copts(), @@ -2718,6 +2722,7 @@ cc_library( "platform/macros.h", "platform/mem.h", "platform/platform.h", + "platform/tstring.h", "platform/types.h", ], copts = tf_copts(), @@ -2751,6 +2756,7 @@ cc_library( "platform/macros.h", "platform/mem.h", "platform/platform.h", + "platform/tstring.h", "platform/types.h", ], copts = tf_copts(), @@ -2780,6 +2786,7 @@ cc_library( "platform/logging.h", "platform/macros.h", "platform/platform.h", + "platform/tstring.h", "platform/types.h", ], copts = tf_copts(), diff --git a/tensorflow/core/framework/types.h b/tensorflow/core/framework/types.h index 7a58c101d7c..e09ea268cd7 100644 --- a/tensorflow/core/framework/types.h +++ b/tensorflow/core/framework/types.h @@ -391,7 +391,7 @@ MATCH_TYPE_AND_ENUM(uint16, DT_UINT16); MATCH_TYPE_AND_ENUM(uint8, DT_UINT8); MATCH_TYPE_AND_ENUM(int16, DT_INT16); MATCH_TYPE_AND_ENUM(int8, DT_INT8); -MATCH_TYPE_AND_ENUM(string, DT_STRING); +MATCH_TYPE_AND_ENUM(tstring, DT_STRING); MATCH_TYPE_AND_ENUM(complex64, DT_COMPLEX64); MATCH_TYPE_AND_ENUM(complex128, DT_COMPLEX128); MATCH_TYPE_AND_ENUM(int64, DT_INT64); diff --git a/tensorflow/core/framework/tstring.h b/tensorflow/core/platform/tstring.h similarity index 85% rename from tensorflow/core/framework/tstring.h rename to tensorflow/core/platform/tstring.h index c995085fd34..c16bd61a59c 100644 --- a/tensorflow/core/framework/tstring.h +++ b/tensorflow/core/platform/tstring.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ -#define TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ +#ifndef TENSORFLOW_CORE_PLATFORM_TSTRING_H_ +#define TENSORFLOW_CORE_PLATFORM_TSTRING_H_ #include @@ -25,4 +25,4 @@ typedef std::string tstring; } // namespace tensorflow -#endif // TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ +#endif // TENSORFLOW_CORE_PLATFORM_TSTRING_H_ diff --git a/tensorflow/core/platform/types.h b/tensorflow/core/platform/types.h index b82d9cc3247..ef6a8f93332 100644 --- a/tensorflow/core/platform/types.h +++ b/tensorflow/core/platform/types.h @@ -17,7 +17,9 @@ limitations under the License. #define TENSORFLOW_CORE_PLATFORM_TYPES_H_ #include + #include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/tstring.h" // Include appropriate platform-dependent implementations #if defined(PLATFORM_GOOGLE) || defined(GOOGLE_INTEGRAL_TYPES)