[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
This commit is contained in:
Benjamin Kramer 2018-09-20 11:06:21 -07:00 committed by TensorFlower Gardener
parent 6b7c84006a
commit b874ada573
4 changed files with 12 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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