Commit dfabb751 authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Add reshape lazy to arguments

parent c02aea85
...@@ -133,6 +133,12 @@ argument argument::reshape(const shape& s) const ...@@ -133,6 +133,12 @@ argument argument::reshape(const shape& s) const
return {s, this->m_data}; return {s, this->m_data};
} }
argument argument::reshape_lazy(const shape& s) const
{
assert(s.element_space() <= this->get_shape().element_space());
return {s, this->m_data};
}
argument::data_t argument::data_t::share() const argument::data_t argument::data_t::share() const
{ {
data_t result; data_t result;
......
...@@ -82,6 +82,7 @@ struct argument : raw_data<argument> ...@@ -82,6 +82,7 @@ struct argument : raw_data<argument>
const shape& get_shape() const; const shape& get_shape() const;
argument reshape(const shape& s) const; argument reshape(const shape& s) const;
argument reshape_lazy(const shape& s) const;
argument copy() const; argument copy() const;
......
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