From f131c79ef375fabf22604632c2e915d634bf172e Mon Sep 17 00:00:00 2001 From: wangliu Date: Wed, 30 May 2018 10:52:02 +0800 Subject: [PATCH] modify code style --- src/framework/operator.h | 2 +- src/{ => io}/io.cpp | 2 +- src/{ => io}/io.h | 0 src/operators/fusion_fc_op.h | 2 +- src/operators/pool_op.h | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) rename src/{ => io}/io.cpp (99%) rename src/{ => io}/io.h (100%) diff --git a/src/framework/operator.h b/src/framework/operator.h index 549916b9a3..a44d264a18 100644 --- a/src/framework/operator.h +++ b/src/framework/operator.h @@ -118,7 +118,7 @@ class FusionOpMatcher : PaddleMobileObject { virtual std::string Type() = 0; - virtual void FolderNodes(const Node &node) { + virtual void FolderNodes(Node &node) { node.Folder(node_.Depth(), Type(), {}); } diff --git a/src/io.cpp b/src/io/io.cpp similarity index 99% rename from src/io.cpp rename to src/io/io.cpp index bfb3c5a7e2..a773939505 100644 --- a/src/io.cpp +++ b/src/io/io.cpp @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "/io.h" +#include "io/io.h" #include #include #include "common/enforce.h" diff --git a/src/io.h b/src/io/io.h similarity index 100% rename from src/io.h rename to src/io/io.h diff --git a/src/operators/fusion_fc_op.h b/src/operators/fusion_fc_op.h index 6e0c50170a..0ed5a2b4d5 100644 --- a/src/operators/fusion_fc_op.h +++ b/src/operators/fusion_fc_op.h @@ -32,7 +32,7 @@ class FusionFcMatcher : public framework::FusionOpMatcher { node_ > std::make_shared("elementwise_add"); } - void FolderNodes(const framework::Node &node) { + void FolderNodes(framework::Node &node) { vector> origin_descs = node.OpDescs(node_.Depth()); node.Folder(node_.Depth(), Type(), {{"elementwise_add", {"Y", "Z"}}}); diff --git a/src/operators/pool_op.h b/src/operators/pool_op.h index 7195c3b4e1..ff44771c56 100644 --- a/src/operators/pool_op.h +++ b/src/operators/pool_op.h @@ -22,6 +22,7 @@ limitations under the License. */ namespace paddle_mobile { namespace operators { using framework::AttributeMap; +using framework::OperatorWithKernel; using framework::Scope; using std::string; template -- GitLab