From 7de802ae1e1e3bd8677887d619e9945359975746 Mon Sep 17 00:00:00 2001 From: Shuai Yuan Date: Wed, 12 Jun 2019 03:38:25 +0000 Subject: [PATCH] [ARM] Fix conversion bug from const float* to float*. test=develop --- paddle/fluid/lite/arm/math/pooling.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/lite/arm/math/pooling.cc b/paddle/fluid/lite/arm/math/pooling.cc index c74e235b6..fc916d0f3 100644 --- a/paddle/fluid/lite/arm/math/pooling.cc +++ b/paddle/fluid/lite/arm/math/pooling.cc @@ -383,8 +383,8 @@ void pooling2x2s2_max(const void* din, void* dout, int num, int chout, int hout, #else w = w_unroll_size; int num = w_unroll_size >> 3; - float* dr0 = reinterpret_cast(r0); - float* dr1 = reinterpret_cast(r1); + const float* dr0 = r0; + const float* dr1 = r1; float* dr_out = data_out_channel; if (num > 0) { asm volatile( @@ -442,7 +442,7 @@ void pooling2x2s2_max(const void* din, void* dout, int num, int chout, int hout, #else w = w_unroll_size; int num = w_unroll_size >> 3; - float* dr0 = reinterpret_cast(r0); + const float* dr0 = r0; float* dr_out = data_out_channel; if (num > 0) { asm volatile( @@ -529,8 +529,8 @@ void pooling2x2s2_ave(const void* din, void* dout, int num, int chout, int hout, #else w = w_unroll_size; int num = w_unroll_size >> 3; - float* dr0 = reinterpret_cast(r0); - float* dr1 = reinterpret_cast(r1); + const float* dr0 = r0; + const float* dr1 = r1; float* dr_out = data_out_channel; if (num > 0) { @@ -593,7 +593,7 @@ void pooling2x2s2_ave(const void* din, void* dout, int num, int chout, int hout, #else w = w_unroll_size; int num = w_unroll_size >> 3; - float* dr0 = reinterpret_cast(r0); + const float* dr0 = r0; float* dr_out = data_out_channel; if (num > 0) { -- GitLab