From afc3ebdb3ca4b054dfde01c890bff8818f2dd35b Mon Sep 17 00:00:00 2001 From: GaoWei8 Date: Tue, 11 Feb 2020 13:18:47 +0000 Subject: [PATCH] polish char codes test=develop --- lite/kernels/x86/reduce_op_function.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lite/kernels/x86/reduce_op_function.h b/lite/kernels/x86/reduce_op_function.h index a6d4b899a5..adfe466843 100644 --- a/lite/kernels/x86/reduce_op_function.h +++ b/lite/kernels/x86/reduce_op_function.h @@ -63,9 +63,7 @@ void ReduceFunctor(const lite::Tensor& input, auto out = EigenScalar::From(output); functor(&x, &out, reduce_dim); } else { - auto fun_name = typeid(Functor).name(); - const char* sum_fun = "SumFunctor"; - auto te = strstr(fun_name, sum_fun); + auto te = strstr(typeid(Functor).name(), "SumFunctor"); if (D == 3 && R_D == 1 && te != NULL) { lite::DDim input_dims = input.dims(); const T* input_data = input.data(); -- GitLab