diff --git a/paddle/fluid/lite/arm/math/pooling.cc b/paddle/fluid/lite/arm/math/pooling.cc index c74e235b6be1d8eb1a753408e182c234eeac0b6c..fc916d0f37c14fa0fcbed1dc74dc8a0964bac05e 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) {