"test/ref_ops_test.cpp" did not exist on "41ed1924e77fc0c19b20569f5b56428bd1d6569f"
Commit af86d975 authored by Paul's avatar Paul
Browse files

Formatting

parent 94ef1ad0
......@@ -14,7 +14,7 @@ struct match_const_add
void apply(program& p, match::matcher_result r) const
{
auto ins = r.result;
auto ins = r.result;
auto arg1 = ins->inputs().at(0)->get_literal();
auto arg2 = ins->inputs().at(1)->get_literal();
......@@ -23,9 +23,6 @@ struct match_const_add
}
};
void constant_propagate::apply(program& p) const
{
match::find_matches(p, match_const_add{});
}
void constant_propagate::apply(program& p) const { match::find_matches(p, match_const_add{}); }
} // namespace migraph
......@@ -14,7 +14,7 @@ struct const_prop_target
migraph::context get_context() const { return {}; }
};
void const_add1()
void const_add1()
{
migraph::program p1;
auto one = p1.add_literal(1);
......@@ -29,8 +29,7 @@ void const_add1()
EXPECT(p1 == p2);
}
void const_add2()
void const_add2()
{
migraph::program p1;
auto one = p1.add_parameter("one", {migraph::shape::int32_type, {1}});
......@@ -45,11 +44,11 @@ void const_add2()
EXPECT(p1 != p2);
}
void const_add3()
void const_add3()
{
migraph::program p1;
auto one = p1.add_literal(1);
auto two = p1.add_literal(2);
auto one = p1.add_literal(1);
auto two = p1.add_literal(2);
auto sum1 = p1.add_instruction(migraph::op::add{}, one, two);
auto sum2 = p1.add_instruction(migraph::op::add{}, sum1, two);
p1.add_instruction(pass_op{}, sum2);
......@@ -61,9 +60,9 @@ void const_add3()
EXPECT(p1 == p2);
}
int main() {
int main()
{
const_add1();
const_add2();
const_add3();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment