Remap DT_STRING from string to tstring. Moved tstring.h to platform/.

See: https://github.com/tensorflow/community/pull/91
PiperOrigin-RevId: 261235273
This commit is contained in:
Dero Gharibian 2019-08-01 17:53:27 -07:00 committed by TensorFlower Gardener
parent 2859264874
commit 27cc0c9a65
4 changed files with 14 additions and 5 deletions

View File

@ -339,6 +339,7 @@ filegroup(
"platform/logging.h", "platform/logging.h",
"platform/macros.h", "platform/macros.h",
"platform/platform_strings.h", "platform/platform_strings.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
@ -711,6 +712,7 @@ cc_library(
"platform/macros.h", "platform/macros.h",
"platform/platform.h", "platform/platform.h",
"platform/protobuf.h", "platform/protobuf.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
"platform/windows/cpu_info.h", "platform/windows/cpu_info.h",
"lib/bfloat16/bfloat16.h", "lib/bfloat16/bfloat16.h",
@ -941,7 +943,6 @@ tf_cuda_library(
"example/feature_util.h", "example/feature_util.h",
"framework/allocator.h", "framework/allocator.h",
"framework/bounds_check.h", "framework/bounds_check.h",
"framework/tstring.h",
"framework/variant.h", "framework/variant.h",
"framework/variant_encode_decode.h", "framework/variant_encode_decode.h",
"framework/variant_op_registry.h", "framework/variant_op_registry.h",
@ -1197,6 +1198,7 @@ cc_library(
"platform/prefetch.h", "platform/prefetch.h",
"platform/protobuf.h", "platform/protobuf.h",
"platform/thread_annotations.h", "platform/thread_annotations.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
"platform/cpu_info.h", "platform/cpu_info.h",
] + if_windows(["platform/windows/integral_types.h"]), ] + if_windows(["platform/windows/integral_types.h"]),
@ -2661,6 +2663,7 @@ cc_library(
"platform/macros.h", "platform/macros.h",
"platform/platform.h", "platform/platform.h",
"platform/png.h", "platform/png.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
copts = tf_copts(), copts = tf_copts(),
@ -2688,6 +2691,7 @@ cc_library(
"platform/logging.h", "platform/logging.h",
"platform/macros.h", "platform/macros.h",
"platform/platform.h", "platform/platform.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
copts = tf_copts(), copts = tf_copts(),
@ -2718,6 +2722,7 @@ cc_library(
"platform/macros.h", "platform/macros.h",
"platform/mem.h", "platform/mem.h",
"platform/platform.h", "platform/platform.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
copts = tf_copts(), copts = tf_copts(),
@ -2751,6 +2756,7 @@ cc_library(
"platform/macros.h", "platform/macros.h",
"platform/mem.h", "platform/mem.h",
"platform/platform.h", "platform/platform.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
copts = tf_copts(), copts = tf_copts(),
@ -2780,6 +2786,7 @@ cc_library(
"platform/logging.h", "platform/logging.h",
"platform/macros.h", "platform/macros.h",
"platform/platform.h", "platform/platform.h",
"platform/tstring.h",
"platform/types.h", "platform/types.h",
], ],
copts = tf_copts(), copts = tf_copts(),

View File

@ -391,7 +391,7 @@ MATCH_TYPE_AND_ENUM(uint16, DT_UINT16);
MATCH_TYPE_AND_ENUM(uint8, DT_UINT8); MATCH_TYPE_AND_ENUM(uint8, DT_UINT8);
MATCH_TYPE_AND_ENUM(int16, DT_INT16); MATCH_TYPE_AND_ENUM(int16, DT_INT16);
MATCH_TYPE_AND_ENUM(int8, DT_INT8); 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(complex64, DT_COMPLEX64);
MATCH_TYPE_AND_ENUM(complex128, DT_COMPLEX128); MATCH_TYPE_AND_ENUM(complex128, DT_COMPLEX128);
MATCH_TYPE_AND_ENUM(int64, DT_INT64); MATCH_TYPE_AND_ENUM(int64, DT_INT64);

View File

@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ #ifndef TENSORFLOW_CORE_PLATFORM_TSTRING_H_
#define TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ #define TENSORFLOW_CORE_PLATFORM_TSTRING_H_
#include <string> #include <string>
@ -25,4 +25,4 @@ typedef std::string tstring;
} // namespace tensorflow } // namespace tensorflow
#endif // TENSORFLOW_CORE_FRAMEWORK_TSTRING_H_ #endif // TENSORFLOW_CORE_PLATFORM_TSTRING_H_

View File

@ -17,7 +17,9 @@ limitations under the License.
#define TENSORFLOW_CORE_PLATFORM_TYPES_H_ #define TENSORFLOW_CORE_PLATFORM_TYPES_H_
#include <string> #include <string>
#include "tensorflow/core/platform/platform.h" #include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/tstring.h"
// Include appropriate platform-dependent implementations // Include appropriate platform-dependent implementations
#if defined(PLATFORM_GOOGLE) || defined(GOOGLE_INTEGRAL_TYPES) #if defined(PLATFORM_GOOGLE) || defined(GOOGLE_INTEGRAL_TYPES)