diff options
author | Benjamin Kramer <kramerb@google.com> | 2018-09-20 11:06:21 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-20 11:11:24 -0700 |
commit | b874ada5731ca2315600f97a2703561a30b82b89 (patch) | |
tree | 7ae2136ed713e2cdb019376d018290f7e9067328 /tensorflow/stream_executor | |
parent | 6b7c84006a73688adf4b8d34ee4afb4921548bc7 (diff) |
[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
Diffstat (limited to 'tensorflow/stream_executor')
-rw-r--r-- | tensorflow/stream_executor/lib/array_slice.h | 8 | ||||
-rw-r--r-- | tensorflow/stream_executor/lib/inlined_vector.h | 4 | ||||
-rw-r--r-- | tensorflow/stream_executor/lib/strcat.h | 6 | ||||
-rw-r--r-- | tensorflow/stream_executor/lib/stringpiece.h | 5 |
4 files changed, 12 insertions, 11 deletions
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 <typename T> +using ArraySlice = absl::Span<const T>; +template <typename T> +using MutableArraySlice = absl::Span<T>; } // 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 |