diff --git a/src/operators/math/math_function.cpp b/src/operators/math/math_function.cpp index 9d39f89b04ebcef93fa9d122d629bdf6f4586c66..fc4c385add5ccf30ebe42695fb616e41deb1a827 100644 --- a/src/operators/math/math_function.cpp +++ b/src/operators/math/math_function.cpp @@ -135,7 +135,7 @@ template struct ClearTensor { void operator()(framework::Tensor *tensor) { auto size = tensor->numel(); - auto *tensor_data = tensor->data(); + auto *tensor_data = tensor->data(); memset((void *)tensor_data, 0, sizeof(T) * size); // NOLINT } }; @@ -151,9 +151,9 @@ struct RowwiseAdd { PADDLE_MOBILE_ENFORCE((output->dims() == in_dims), "output->dims() must be equal to in_dims."); - auto *input_data = input.data(); - auto *out_data = output->data(); - auto *vec_data = vector.data(); + auto *input_data = input.data(); + auto *out_data = output->data(); + auto *vec_data = vector.data(); for (int64_t i = 0; i < in_dims[0]; ++i) { for (int64_t j = 0; j < size; ++j) { out_data[i * size + j] = input_data[i * size + j] + vec_data[j];