提交 5cf46e90 编写于 作者: alinag's avatar alinag

reduce DDim copy

test=develop
上级 bc681960
...@@ -65,7 +65,7 @@ void ReduceFunctor(const lite::Tensor& input, ...@@ -65,7 +65,7 @@ void ReduceFunctor(const lite::Tensor& input,
} else { } else {
auto te = strstr(typeid(Functor).name(), "SumFunctor"); auto te = strstr(typeid(Functor).name(), "SumFunctor");
if (D == 3 && R_D == 1 && te != NULL) { if (D == 3 && R_D == 1 && te != NULL) {
lite::DDim input_dims = input.dims(); const lite::DDim& input_dims = input.dims();
const T* input_data = input.data<T>(); const T* input_data = input.data<T>();
T* output_data = output->mutable_data<T>(); T* output_data = output->mutable_data<T>();
for (int i = 0; i < input_dims[0]; i++) { for (int i = 0; i < input_dims[0]; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册