| 114 | } |
| 115 | |
| 116 | void ComputingGraph::assert_destroy(std::shared_ptr<ComputingGraph>& ptr) { |
| 117 | mgb_assert( |
| 118 | ptr.use_count() <= 2, "unexpected use_count: %zu", size_t(ptr.use_count())); |
| 119 | ptr.reset(); |
| 120 | } |
| 121 | |
| 122 | #if !MGB_THREAD_SAFE |
| 123 | size_t ComputingGraph::prealloc_static_storage(size_t size) { |