Commit 7b7b3aad authored by charlie's avatar charlie
Browse files

Change to maintain const objectness

parent 38f0ed63
...@@ -38,20 +38,20 @@ struct check_shapes ...@@ -38,20 +38,20 @@ struct check_shapes
const shape* begin; const shape* begin;
const shape* end; const shape* end;
const std::string name; const std::string name;
bool dynamic_allowed = false; const bool dynamic_allowed;
check_shapes(const shape* b, const shape* e, const std::string& n) : begin(b), end(e), name(n) check_shapes(const shape* b, const shape* e, const std::string& n, const bool d = false) : begin(b), end(e), name(n),dynamic_allowed(d)
{ {
} }
template <class Op> template <class Op>
check_shapes(const shape* b, const shape* e, const Op& op) : begin(b), end(e), name(op.name()) check_shapes(const shape* b, const shape* e, const Op& op, const bool d = false) : begin(b), end(e), name(op.name()), dynamic_allowed(d)
{ {
} }
template <class Op> template <class Op>
check_shapes(const std::vector<shape>& s, const Op& op) check_shapes(const std::vector<shape>& s, const Op& op, const bool d = false)
: begin(s.data()), end(s.data() + s.size()), name(op.name()) : begin(s.data()), end(s.data() + s.size()), name(op.name()), dynamic_allowed(d)
{ {
} }
...@@ -286,15 +286,6 @@ struct check_shapes ...@@ -286,15 +286,6 @@ struct check_shapes
return *this; return *this;
} }
/*!
* Denotes that the shapes can be dynamic for the operator.
*/
const check_shapes& allow_dynamic()
{
dynamic_allowed = true;
return *this;
}
template <class F> template <class F>
bool same(F f) const bool same(F f) 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