From b874ada5731ca2315600f97a2703561a30b82b89 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 20 Sep 2018 11:06:21 -0700 Subject: [SE] Use absl instead of TF classes where an absl version exists With the exception of StrCat all of these are using absl already, this change just removes one layer of indirection. PiperOrigin-RevId: 213846036 --- tensorflow/stream_executor/lib/array_slice.h | 8 +++++--- tensorflow/stream_executor/lib/inlined_vector.h | 4 ++-- tensorflow/stream_executor/lib/strcat.h | 6 +++--- tensorflow/stream_executor/lib/stringpiece.h | 5 ++--- 4 files changed, 12 insertions(+), 11 deletions(-) (limited to 'tensorflow/stream_executor') diff --git a/tensorflow/stream_executor/lib/array_slice.h b/tensorflow/stream_executor/lib/array_slice.h index 8e3c4ca047..5f4e586762 100644 --- a/tensorflow/stream_executor/lib/array_slice.h +++ b/tensorflow/stream_executor/lib/array_slice.h @@ -16,13 +16,15 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_LIB_ARRAY_SLICE_H_ #define TENSORFLOW_STREAM_EXECUTOR_LIB_ARRAY_SLICE_H_ -#include "tensorflow/core/lib/gtl/array_slice.h" +#include "absl/types/span.h" namespace stream_executor { namespace port { -using tensorflow::gtl::ArraySlice; -using tensorflow::gtl::MutableArraySlice; +template +using ArraySlice = absl::Span; +template +using MutableArraySlice = absl::Span; } // namespace port } // namespace stream_executor diff --git a/tensorflow/stream_executor/lib/inlined_vector.h b/tensorflow/stream_executor/lib/inlined_vector.h index 40bdddb180..0198947e5b 100644 --- a/tensorflow/stream_executor/lib/inlined_vector.h +++ b/tensorflow/stream_executor/lib/inlined_vector.h @@ -16,12 +16,12 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_LIB_INLINED_VECTOR_H_ #define TENSORFLOW_STREAM_EXECUTOR_LIB_INLINED_VECTOR_H_ -#include "tensorflow/core/lib/gtl/inlined_vector.h" +#include "absl/container/inlined_vector.h" namespace stream_executor { namespace port { -using tensorflow::gtl::InlinedVector; +using absl::InlinedVector; } // namespace port } // namespace stream_executor diff --git a/tensorflow/stream_executor/lib/strcat.h b/tensorflow/stream_executor/lib/strcat.h index c959e4df5b..3688d7b4eb 100644 --- a/tensorflow/stream_executor/lib/strcat.h +++ b/tensorflow/stream_executor/lib/strcat.h @@ -18,13 +18,13 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_LIB_STRCAT_H_ #define TENSORFLOW_STREAM_EXECUTOR_LIB_STRCAT_H_ -#include "tensorflow/core/lib/strings/strcat.h" +#include "absl/strings/str_cat.h" namespace stream_executor { namespace port { -using tensorflow::strings::StrCat; -using tensorflow::strings::StrAppend; +using absl::StrAppend; +using absl::StrCat; } // namespace port } // namespace stream_executor diff --git a/tensorflow/stream_executor/lib/stringpiece.h b/tensorflow/stream_executor/lib/stringpiece.h index b80de5df30..7624910129 100644 --- a/tensorflow/stream_executor/lib/stringpiece.h +++ b/tensorflow/stream_executor/lib/stringpiece.h @@ -16,13 +16,12 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_LIB_STRINGPIECE_H_ #define TENSORFLOW_STREAM_EXECUTOR_LIB_STRINGPIECE_H_ -#include "tensorflow/core/lib/core/stringpiece.h" -#include "tensorflow/stream_executor/platform/port.h" +#include "absl/strings/string_view.h" namespace stream_executor { namespace port { -using tensorflow::StringPiece; +using StringPiece = absl::string_view; } // namespace port } // namespace stream_executor -- cgit v1.2.3