From 6703e91046017330258ff8f41cd343566cbc588a Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Mon, 6 Dec 2021 23:00:43 -0500 Subject: [PATCH] [.clang-format] Init @ root --- .clang-format | 4 ++++ tensorflow/compiler/xla/python/types.h | 1 + 2 files changed, 5 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..e06cf478f46 --- /dev/null +++ b/.clang-format @@ -0,0 +1,4 @@ +# Run manually to reformat a file: +# clang-format -i --style=file +BasedOnStyle: Google +DerivePointerAlignment: false diff --git a/tensorflow/compiler/xla/python/types.h b/tensorflow/compiler/xla/python/types.h index d1b71243abf..00341c23257 100644 --- a/tensorflow/compiler/xla/python/types.h +++ b/tensorflow/compiler/xla/python/types.h @@ -118,6 +118,7 @@ pybind11::tuple SpanToTuple(absl::Span xs); template std::vector IterableToVector(const pybind11::iterable& iterable) { std::vector output; + output.reserve(std::distance(iterable.begin(), iterable.end())); for (auto item : iterable) { output.push_back(item.cast()); }