From 7a32f5555e26430620f139e41fe73530f4b857a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=A5=87=E5=8F=AF?= Date: Fri, 7 Sep 2018 14:06:39 +0800 Subject: [PATCH] fix resize bicubic code format --- mace/kernels/resize_bicubic.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mace/kernels/resize_bicubic.h b/mace/kernels/resize_bicubic.h index b568983a..e12eeb49 100644 --- a/mace/kernels/resize_bicubic.h +++ b/mace/kernels/resize_bicubic.h @@ -64,11 +64,12 @@ inline void GetWeightsAndIndices(float scale, int64_t out_loc, int64_t limit, const float delta = scale * out_loc - in_loc; const int64_t offset = lrintf(delta * kTableSize); const float *coeffs_tab = GetCoeffsTable(); - *weights = {coeffs_tab[offset * 2 + 1], coeffs_tab[offset * 2], - coeffs_tab[(kTableSize - offset) * 2], - coeffs_tab[(kTableSize - offset) * 2 + 1]}; + *weights = {coeffs_tab[offset * 2 + 1], + coeffs_tab[offset * 2], + coeffs_tab[(kTableSize - offset) * 2], + coeffs_tab[(kTableSize - offset) * 2 + 1]}; *indices = {Bound(in_loc - 1, limit), Bound(in_loc, limit), - Bound(in_loc + 1, limit), Bound(in_loc + 2, limit)}; + Bound(in_loc + 1, limit), Bound(in_loc + 2, limit)}; } inline float Interpolate1D(const std::vector &weights, -- GitLab