提交 49432d11 编写于 作者: P panyifeng

fix cpplint

上级 b7425d3e
......@@ -99,11 +99,11 @@ bool FindControlDependOut(AnfNodePtrList *outputs, const AnfNodePtrList &vir_out
outputs_set.insert(out);
}
bool has_erase_outs = false;
size_t index = -1;
int index = -1;
for (auto it = outputs->begin(); it != outputs->end();) {
index++;
auto out = *it;
(*eqv)[out] = vir_outputs[index];
(*eqv)[out] = vir_outputs[IntToSize(index)];
auto users = mng->node_users()[out];
bool is_only_control_depend_use = true;
std::vector<size_t> control_depend_use_index;
......
......@@ -19,6 +19,7 @@
#include <iterator>
#include <vector>
#include <string>
#include <algorithm>
#include "ir/meta_func_graph.h"
#include "ir/param_info.h"
#include "ir/primitive.h"
......
......@@ -19,6 +19,7 @@
#include <deque>
#include <memory>
#include <unordered_map>
#include <algorithm>
#include "ir/anf.h"
#include "ir/manager.h"
......
......@@ -217,6 +217,7 @@ class NewParameter : public Pattern {
default_tensor_ = std::make_shared<tensor::Tensor>(*default_tensor.get());
built_ = false;
}
~NewParameter() = default;
MS_DECLARE_PARENT(NewParameter, Pattern);
MatchResultPtr match(const AnfNodePtr &node) override {
MS_LOG(EXCEPTION) << "Find NewParameter in pattern, NewParameter should only appear in the target.\n";
......@@ -244,6 +245,7 @@ class Imm : public Pattern {
public:
Imm() { unique_name_ = std::to_string(g_id_++); }
explicit Imm(int value) : value_(value) { unique_name_ = std::to_string(g_id_++) + "Imm_" + std::to_string(value); }
~Imm() = default;
MS_DECLARE_PARENT(Imm, Pattern);
MatchResultPtr match(const AnfNodePtr &node) override;
int value() { return value_; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册