File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def main():
129129
130130 plot .tight_layout ()
131131 plot .savefig ('result.png' )
132- plot .show ()
132+ # plot.show()
133133 plot .close (fig )
134134
135135# run the main entry
Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ inline void Executor::_init_module_node(Node* node) {
609609 };
610610}
611611
612- // Procedure:
612+ // Procedure: _invoke
613613inline void Executor::_invoke (unsigned me, Node* node) {
614614
615615 // Here we need to fetch the num_successors first to avoid the invalid memory
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ std::unique_ptr<T> ObjectPool<T>::destack(ArgsT&&... args) {
7474// Procedure: enstack
7575template <typename T>
7676void ObjectPool<T>::enstack(std::unique_ptr<T>&& obj) {
77- obj->recycle ();
78- _stack.push_back (std::move (obj));
77+ if (_stack.size () < 4096 ) {
78+ obj->recycle ();
79+ _stack.push_back (std::move (obj));
80+ }
7981}
8082
8183} // end of namespace tf -----------------------------------------------------
You can’t perform that action at this time.
0 commit comments