diff options
Diffstat (limited to 'tensorflow/compiler/xla/window_util.cc')
-rw-r--r-- | tensorflow/compiler/xla/window_util.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tensorflow/compiler/xla/window_util.cc b/tensorflow/compiler/xla/window_util.cc index 6f7f1479b9..23161873a0 100644 --- a/tensorflow/compiler/xla/window_util.cc +++ b/tensorflow/compiler/xla/window_util.cc @@ -26,8 +26,8 @@ namespace xla { namespace window_util { /* static */ string ToString(const WindowDimension& dim) { - using tensorflow::strings::StrAppend; using tensorflow::strings::StrCat; + using tensorflow::strings::StrAppend; string str = StrCat("(size=", dim.size()); if (dim.stride() != 1) { StrAppend(&str, ",stride=", dim.stride()); @@ -49,22 +49,22 @@ namespace window_util { } string ToString(const Window& window) { - using tensorflow::strings::StrAppend; using tensorflow::strings::StrCat; + using tensorflow::strings::StrAppend; string str; - const auto add_field = - [&](const char* heading, - std::function<string(const WindowDimension&)> format) { - StrAppend(&str, heading, "="); - const char* prefix = ""; - for (const auto& window_dimension : window.dimensions()) { - StrAppend(&str, prefix, format(window_dimension)); - prefix = "x"; - } - }; - - add_field("size", + const auto add_field = [&]( + const char* heading, + std::function<string(const WindowDimension&)> format) { + StrAppend(&str, heading, "="); + const char* prefix = ""; + for (const auto& window_dimension : window.dimensions()) { + StrAppend(&str, prefix, format(window_dimension)); + prefix = "x"; + } + }; + + add_field("window", [](const WindowDimension& dim) { return StrCat(dim.size()); }); if (HasStride(window)) { add_field(" stride", |