diff options
author | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2017-07-16 03:47:13 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2017-07-16 03:47:13 +0300 |
commit | 2ef3184dc09c471a4c0b16aedc4ea02e91d053ff (patch) | |
tree | c46b3f449d7d692e159789ecc49dc078b26a513a /src/graph/node_operators_unary.h | |
parent | 44f14d6a1df2391b3312b51e435a23bcec800008 (diff) |
working aligned memory allocation
Diffstat (limited to 'src/graph/node_operators_unary.h')
-rw-r--r-- | src/graph/node_operators_unary.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h index ee749e9c..99cdb74e 100644 --- a/src/graph/node_operators_unary.h +++ b/src/graph/node_operators_unary.h @@ -535,7 +535,11 @@ private: public: template <typename... Args> ReshapeNodeOp(Expr a, Shape shape, Args... args) - : UnaryNodeOp(a, keywords::shape = shape, args...), reshapee_(a) {} + : UnaryNodeOp(a, keywords::shape = shape, args...), reshapee_(a) { + Node::destroy_ = false; + } + + ~ReshapeNodeOp() {} size_t allocate() { return 0; } void free() {} @@ -585,7 +589,9 @@ public: TimestepNodeOp(Expr a, size_t step) : UnaryNodeOp(a, keywords::shape = newShape(a)), stepNode_(a), - step_(step) {} + step_(step) { + Node::destroy_ = false; + } Shape newShape(Expr a) { Shape outShape = a->shape(); |