aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util
diff options
context:
space:
mode:
authorGravatar Clayne Robison <clayne.b.robison@intel.com>2018-06-11 17:15:38 -0700
committerGravatar drpngx <drpngx@users.noreply.github.com>2018-06-11 17:15:38 -0700
commitc169282cfe03e146350d2e17f79be4bf759c4146 (patch)
treeb2cc7268a5e5e473f660c8b7bcb7c616386f75ef /tensorflow/core/util
parent61bcb1e21b304255f6ad1faddb9b4487cc2424d8 (diff)
[Intel MKL] Remove use of absl::string_view (#19869)
* Remove use of absl::string * Using tensorflow::StringPiece * Revert const string& to google formatting style.
Diffstat (limited to 'tensorflow/core/util')
-rw-r--r--tensorflow/core/util/mkl_util.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/core/util/mkl_util.h b/tensorflow/core/util/mkl_util.h
index 7fc9d69a9f..90b6533690 100644
--- a/tensorflow/core/util/mkl_util.h
+++ b/tensorflow/core/util/mkl_util.h
@@ -42,6 +42,7 @@ limitations under the License.
#ifndef INTEL_MKL_ML
#include "mkldnn.hpp"
+#include "tensorflow/core/lib/core/stringpiece.h"
using mkldnn::engine;
using mkldnn::memory;
@@ -1876,7 +1877,7 @@ class FactoryKeyCreator {
template <typename T>
void AddAsKey(const T data) {
auto buffer = reinterpret_cast<const char *>(&data);
- Append(absl::string_view(buffer, sizeof(T)));
+ Append(StringPiece(buffer, sizeof(T)));
}
std::string GetKey() {
@@ -1887,8 +1888,8 @@ class FactoryKeyCreator {
string key_;
const char delimiter = 'x';
const int kMaxKeyLength = 256;
- void Append(absl::string_view s) {
- key_.append(string(s));
+ void Append(StringPiece s) {
+ key_.append(s.ToString());
key_.append(1, delimiter);
}
};