Commit b211af48 authored by Paul's avatar Paul
Browse files

Formatting

parent fe13db50
...@@ -505,12 +505,12 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params) ...@@ -505,12 +505,12 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
void program::debug_print() const { std::cout << *this << std::endl; } void program::debug_print() const { std::cout << *this << std::endl; }
void program::debug_print(instruction_ref ins) const void program::debug_print(instruction_ref ins) const
{ {
if (ins == this->end()) if(ins == this->end())
{ {
std::cout << "End instruction" << std::endl; std::cout << "End instruction" << std::endl;
return; return;
} }
if (not has_instruction(ins)) if(not has_instruction(ins))
{ {
std::cout << "Instruction not part of program" << std::endl; std::cout << "Instruction not part of program" << std::endl;
return; return;
......
...@@ -64,11 +64,12 @@ struct stream_info ...@@ -64,11 +64,12 @@ struct stream_info
std::sort(args.begin(), args.end(), compare); std::sort(args.begin(), args.end(), compare);
auto it = std::lower_bound(std::next(args.begin()), auto it = std::lower_bound(std::next(args.begin()),
args.end(), args.end(),
min_partition_threshold, min_partition_threshold,
[&](auto i, std::size_t w) { return this->weights[i] > w; }); [&](auto i, std::size_t w) { return this->weights[i] > w; });
assert(it == args.end() or this->weights[*it] <= min_partition_threshold); assert(it == args.end() or this->weights[*it] <= min_partition_threshold);
assert(it == args.end() or std::prev(it) == args.begin() or this->weights[*std::prev(it)] > min_partition_threshold); assert(it == args.end() or std::prev(it) == args.begin() or
this->weights[*std::prev(it)] > min_partition_threshold);
return it; return it;
} }
...@@ -101,7 +102,7 @@ struct stream_info ...@@ -101,7 +102,7 @@ struct stream_info
auto args = ins->inputs(); auto args = ins->inputs();
auto threshold_it = sort_args(args); auto threshold_it = sort_args(args);
if (not args.empty()) if(not args.empty())
{ {
assert(threshold_it != args.begin()); assert(threshold_it != args.begin());
self(args.front(), part); self(args.front(), part);
...@@ -114,7 +115,6 @@ struct stream_info ...@@ -114,7 +115,6 @@ struct stream_info
{ {
self(i, part); self(i, part);
} }
} }
// Sort instructions // Sort instructions
p.move_instruction(ins, p.end()); p.move_instruction(ins, p.end());
......
...@@ -690,10 +690,9 @@ TEST_CASE(inner_split1) ...@@ -690,10 +690,9 @@ TEST_CASE(inner_split1)
EXPECT(t.get_stream(s1) != t.get_stream(s2)); EXPECT(t.get_stream(s1) != t.get_stream(s2));
EXPECT(t.get_stream(output) == 0); EXPECT(t.get_stream(output) == 0);
EXPECT(get_wait_for(output) == EXPECT(
get_wait_for( get_wait_for(output) ==
t.get_stream(output), get_wait_for(t.get_stream(output), {t.get_stream(i1), t.get_stream(s1), t.get_stream(s2)}));
{t.get_stream(i1), t.get_stream(s1), t.get_stream(s2)}));
EXPECT(get_wait_for(s1).empty()); EXPECT(get_wait_for(s1).empty());
// TODO: Remove the extra wait here // TODO: Remove the extra wait here
// EXPECT(get_wait_for(s2).empty()); // EXPECT(get_wait_for(s2).empty());
...@@ -719,10 +718,9 @@ TEST_CASE(inner_split2) ...@@ -719,10 +718,9 @@ TEST_CASE(inner_split2)
EXPECT(t.get_stream(s1.back()) != t.get_stream(s2.back())); EXPECT(t.get_stream(s1.back()) != t.get_stream(s2.back()));
EXPECT(t.get_stream(output) == 0); EXPECT(t.get_stream(output) == 0);
EXPECT(get_wait_for(output) == get_wait_for(t.get_stream(output), EXPECT(get_wait_for(output) ==
{t.get_stream(i1), get_wait_for(t.get_stream(output),
t.get_stream(s1.back()), {t.get_stream(i1), t.get_stream(s1.back()), t.get_stream(s2.back())}));
t.get_stream(s2.back())}));
EXPECT(get_wait_for(s1.front()) == get_wait_for({t.get_stream(c1.back())})); EXPECT(get_wait_for(s1.front()) == get_wait_for({t.get_stream(c1.back())}));
check_conflicts(p, {c1, {i1}, s1, s2}); check_conflicts(p, {c1, {i1}, s1, s2});
} }
......
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