From 7f3f2fe010276377610c934b3adc8a1953af6a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=A5=87=E5=8F=AF?= Date: Fri, 31 Aug 2018 18:20:33 +0800 Subject: [PATCH] put variable in omp parallel to fix test error --- mace/kernels/resize_bicubic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mace/kernels/resize_bicubic.h b/mace/kernels/resize_bicubic.h index bf61f175..37e86630 100644 --- a/mace/kernels/resize_bicubic.h +++ b/mace/kernels/resize_bicubic.h @@ -95,7 +95,6 @@ inline void ResizeImage(const float *images, const float height_scale, const float width_scale, float *output) { - std::vector coeff = {0.0, 0.0, 0.0, 0.0}; #pragma omp parallel for collapse(2) for (index_t b = 0; b < batch_size; ++b) { for (index_t y = 0; y < out_height; ++y) { @@ -116,6 +115,7 @@ inline void ResizeImage(const float *images, images + (b * channels + c) * in_height * in_width; float *channel_output_ptr = output + (b * channels + c) * out_height * out_width; + std::vector coeff(4, 0.0); for (index_t i = 0; i < 4; ++i) { const std::vector values = { static_cast(channel_input_ptr -- GitLab