Commit f0c512bc authored by Paul's avatar Paul
Browse files

Formatting

parent a9e5d73c
...@@ -111,7 +111,7 @@ void program::compile(const target& t) ...@@ -111,7 +111,7 @@ void program::compile(const target& t)
{ {
assert(this->validate() != impl->instructions.end()); assert(this->validate() != impl->instructions.end());
this->impl->ctx = t.get_context(); this->impl->ctx = t.get_context();
for(auto&& p:t.get_passes(this->impl->ctx)) for(auto&& p : t.get_passes(this->impl->ctx))
{ {
p.apply(*this); p.apply(*this);
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -542,21 +542,12 @@ struct cpu_pass ...@@ -542,21 +542,12 @@ struct cpu_pass
{ {
std::string name() const { return "cpu::pass"; } std::string name() const { return "cpu::pass"; }
void apply(program & p) const void apply(program& p) const { cpu_apply{&p}.apply(); }
{
cpu_apply{&p}.apply();
}
}; };
std::string cpu_target::name() const { return "cpu"; } std::string cpu_target::name() const { return "cpu"; }
std::vector<pass> cpu_target::get_passes(context&) const std::vector<pass> cpu_target::get_passes(context&) const { return {cpu_pass{}}; }
{
return
{
cpu_pass{}
};
}
} // namespace cpu } // namespace cpu
......
...@@ -68,10 +68,7 @@ struct minus_op ...@@ -68,10 +68,7 @@ struct minus_op
struct id_target struct id_target
{ {
std::string name() const { return "id"; } std::string name() const { return "id"; }
std::vector<migraph::pass> get_passes(migraph::context&) const std::vector<migraph::pass> get_passes(migraph::context&) const { return {}; }
{
return {};
}
migraph::context get_context() const { return {}; } migraph::context get_context() const { return {}; }
}; };
......
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