提交 b0568122 编写于 作者: L liuruilong

format files

上级 746567b0
...@@ -92,7 +92,8 @@ int Node::Depth(int begin) { ...@@ -92,7 +92,8 @@ int Node::Depth(int begin) {
Node &Node::Folder( Node &Node::Folder(
int size, std::string type, int size, std::string type,
std::map<std::string, std::vector<std::pair<std::string, std::string>>> change, std::map<std::string, std::vector<std::pair<std::string, std::string>>>
change,
std::vector<std::shared_ptr<Node>> *removed_nodes) { std::vector<std::shared_ptr<Node>> *removed_nodes) {
std::shared_ptr<framework::OpDesc> op_desc = std::shared_ptr<framework::OpDesc> op_desc =
std::make_shared<framework::OpDesc>(); std::make_shared<framework::OpDesc>();
...@@ -109,14 +110,14 @@ Node &Node::Folder( ...@@ -109,14 +110,14 @@ Node &Node::Folder(
void Node::Folder( void Node::Folder(
std::shared_ptr<framework::OpDesc> op_desc, std::shared_ptr<framework::OpDesc> op_desc,
std::vector<std::shared_ptr<Node>> *outputs, int index, std::vector<std::shared_ptr<Node>> *outputs, int index,
std::map<std::string, std::vector<std::pair<std::string, std::string>>> *change, std::map<std::string, std::vector<std::pair<std::string, std::string>>>
*change,
Node *begin_node, std::vector<std::shared_ptr<Node>> *removed_nodes) { Node *begin_node, std::vector<std::shared_ptr<Node>> *removed_nodes) {
if (change->find(this->type_) != change->end()) { if (change->find(this->type_) != change->end()) {
auto change_pairs = (*change)[this->type_]; auto change_pairs = (*change)[this->type_];
for (const auto &change_pair: change_pairs) { for (const auto &change_pair : change_pairs) {
op_desc->GetInputs()[change_pair.second] = op_desc->GetInputs()[change_pair.second] =
this->op_desc_->GetInputs()[change_pair.first]; this->op_desc_->GetInputs()[change_pair.first];
} }
} }
......
...@@ -17,6 +17,7 @@ limitations under the License. */ ...@@ -17,6 +17,7 @@ limitations under the License. */
#include <cinttypes> #include <cinttypes>
#include <map> #include <map>
#include <string> #include <string>
#include <utility>
#include <vector> #include <vector>
#include "common/log.h" #include "common/log.h"
#include "framework/program/op_desc.h" #include "framework/program/op_desc.h"
...@@ -43,7 +44,8 @@ class Node { ...@@ -43,7 +44,8 @@ class Node {
int Depth(int begin = 0); int Depth(int begin = 0);
Node &Folder( Node &Folder(
int size, std::string type, int size, std::string type,
std::map<std::string, std::vector<std::pair<std::string, std::string>>> change, std::map<std::string, std::vector<std::pair<std::string, std::string>>>
change,
std::vector<std::shared_ptr<Node>> *removed_nodes); std::vector<std::shared_ptr<Node>> *removed_nodes);
std::vector<std::shared_ptr<framework::OpDesc>> OpDescs(int size); std::vector<std::shared_ptr<framework::OpDesc>> OpDescs(int size);
std::shared_ptr<framework::OpDesc> OpDescOfNode() { return op_desc_; } std::shared_ptr<framework::OpDesc> OpDescOfNode() { return op_desc_; }
...@@ -56,7 +58,8 @@ class Node { ...@@ -56,7 +58,8 @@ class Node {
void Folder( void Folder(
std::shared_ptr<framework::OpDesc> op_desc, std::shared_ptr<framework::OpDesc> op_desc,
std::vector<std::shared_ptr<Node>> *outputs, int index, std::vector<std::shared_ptr<Node>> *outputs, int index,
std::map<std::string, std::vector<std::pair<std::string, std::string>>> *change, std::map<std::string, std::vector<std::pair<std::string, std::string>>>
*change,
Node *begin_node, std::vector<std::shared_ptr<Node>> *removed_nodes); Node *begin_node, std::vector<std::shared_ptr<Node>> *removed_nodes);
std::shared_ptr<framework::OpDesc> op_desc_; std::shared_ptr<framework::OpDesc> op_desc_;
#ifdef PADDLE_MOBILE_DEBUG #ifdef PADDLE_MOBILE_DEBUG
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册