From 44b5891121354e3e7f05b8f9c90b7d58eb6b4aab Mon Sep 17 00:00:00 2001 From: Junjie Bai Date: Sun, 31 Mar 2019 22:26:27 -0700 Subject: [PATCH] Fix unused lambda capture warnings (#18662) Summary: ``` aten/src/ATen/native/cpu/DistanceOpsKernel.cpp.DEFAULT.cpp:109:104: warning: lambda capture 'combs' is not used [-Wunused-lambda-capture] parallel_for(0, combs, internal::GRAIN_SIZE / (16 * m), [p, self_start, self_end, n, m, res_start, combs](int64_t k, int64_t end) { ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/18662 Differential Revision: D14699379 Pulled By: bddppq fbshipit-source-id: 5062d4327bb5f7b485c2ffa30c98e10576416f03 --- aten/src/ATen/native/cpu/DistanceOpsKernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aten/src/ATen/native/cpu/DistanceOpsKernel.cpp b/aten/src/ATen/native/cpu/DistanceOpsKernel.cpp index 688866f..114fa3c 100644 --- a/aten/src/ATen/native/cpu/DistanceOpsKernel.cpp +++ b/aten/src/ATen/native/cpu/DistanceOpsKernel.cpp @@ -106,7 +106,7 @@ struct Dist { // vector from the input, j is the second, and k is the result index. This // parallelizes over the range of k and infers what i and j are from the // value of k. - parallel_for(0, combs, internal::GRAIN_SIZE / (16 * m), [p, self_start, self_end, n, m, res_start, combs](int64_t k, int64_t end) { + parallel_for(0, combs, internal::GRAIN_SIZE / (16 * m), [p, self_start, self_end, n, m, res_start](int64_t k, int64_t end) { const Vec pvec(p); double n2 = n - .5; // The -1 accounts for floating point truncation issues -- 2.7.4