Commit 219ba9b8 authored by Paul's avatar Paul
Browse files

Formatting

parent 6fe85d43
...@@ -126,10 +126,7 @@ bool program::has_instruction(instruction_ref ins) const ...@@ -126,10 +126,7 @@ bool program::has_instruction(instruction_ref ins) const
instruction_ref program::begin() { return impl->instructions.begin(); } instruction_ref program::begin() { return impl->instructions.begin(); }
instruction_ref program::end() { return impl->instructions.end(); } instruction_ref program::end() { return impl->instructions.end(); }
shape program::get_shape() const shape program::get_shape() const { return impl->instructions.back().result; }
{
return impl->instructions.back().result;
}
instruction_ref program::validate() const instruction_ref program::validate() const
{ {
......
...@@ -22,7 +22,8 @@ shape::shape(type_t t, std::vector<std::size_t> l, std::vector<std::size_t> s) ...@@ -22,7 +22,8 @@ shape::shape(type_t t, std::vector<std::size_t> l, std::vector<std::size_t> s)
assert(m_lens.size() == m_strides.size()); assert(m_lens.size() == m_strides.size());
assert(std::any_of(m_strides.begin(), m_strides.end(), [](auto x) { return x > 0; }) and assert(std::any_of(m_strides.begin(), m_strides.end(), [](auto x) { return x > 0; }) and
"At least one stride must be non-zero"); "At least one stride must be non-zero");
m_packed = this->elements() == this->element_space() and std::is_sorted(m_strides.rbegin(), m_strides.rend()); m_packed = this->elements() == this->element_space() and
std::is_sorted(m_strides.rbegin(), m_strides.rend());
} }
void shape::calculate_strides() void shape::calculate_strides()
......
...@@ -29,6 +29,4 @@ void after_literal_transpose() ...@@ -29,6 +29,4 @@ void after_literal_transpose()
EXPECT(p.get_shape().packed()); EXPECT(p.get_shape().packed());
} }
int main() { int main() { after_literal_transpose(); }
after_literal_transpose();
}
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