From b283b1de39d887518e1bd627d83a54308fd7dd98 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 5 Jan 2022 13:39:12 -0800 Subject: [PATCH] Cleaning code in fbcode/caffe2/c10/core/TensorImpl.h (#70588) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/70588 Test Plan: Sandcastle Reviewed By: meyering Differential Revision: D33399751 fbshipit-source-id: 3e507973f7a8f58635f3446650e85d0f959254c0 --- c10/core/TensorImpl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c10/core/TensorImpl.h b/c10/core/TensorImpl.h index 32dfe317488..22b985b239f 100644 --- a/c10/core/TensorImpl.h +++ b/c10/core/TensorImpl.h @@ -1,10 +1,5 @@ #pragma once -#include -#include -#include -#include - #include #include #include @@ -22,6 +17,11 @@ #include #include +#include +#include +#include +#include + // A global boolean variable to control whether we free memory when a Tensor // is shrunk to a smaller size. As a result, a Tensor is always going to // keep the memory allocated for its maximum capacity reshaped to so far. @@ -60,7 +60,7 @@ namespace c10 { /** * A utility function to convert vector to vector. */ -inline std::vector ToVectorint64_t(ArrayRef src) { +inline std::vector ToVectorint64_t(const ArrayRef& src) { return std::vector(src.begin(), src.end()); }