From 9fe137a3c23a341744928859d9ff81a7db331fbb Mon Sep 17 00:00:00 2001 From: nihui Date: Sun, 23 Aug 2020 11:11:51 +0800 Subject: [PATCH] fix build, second try --- src/layer/arm/batchnorm_arm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layer/arm/batchnorm_arm.cpp b/src/layer/arm/batchnorm_arm.cpp index 446b69eb6..602befaea 100644 --- a/src/layer/arm/batchnorm_arm.cpp +++ b/src/layer/arm/batchnorm_arm.cpp @@ -153,10 +153,11 @@ int BatchNorm_arm::forward_inplace(Mat& bottom_top_blob, const Option& opt) cons float a = a_data[i]; float b = b_data[i]; + int j = 0; +#if __ARM_NEON float32x4_t _a = vdupq_n_f32(a); float32x4_t _b = vdupq_n_f32(b); - int j = 0; for (; j + 3 < w; j += 4) { float32x4_t _p = vld1q_f32(ptr); @@ -165,6 +166,7 @@ int BatchNorm_arm::forward_inplace(Mat& bottom_top_blob, const Option& opt) cons ptr += 4; } +#endif // __ARM_NEON for (; j < w; j++) { *ptr = b * *ptr + a;