| 26 | namespace ppl { namespace nn { namespace python { |
| 27 | |
| 28 | struct PyRuntime final { |
| 29 | PyRuntime(const std::vector<std::shared_ptr<Engine>>& e, Runtime* r) : ptr(r), engines(e) {} |
| 30 | PyRuntime(PyRuntime&&) = default; |
| 31 | PyRuntime& operator=(PyRuntime&&) = default; |
| 32 | ~PyRuntime() { |
| 33 | ptr.reset(); |
| 34 | engines.clear(); |
| 35 | } |
| 36 | |
| 37 | std::unique_ptr<Runtime> ptr; |
| 38 | std::vector<std::shared_ptr<Engine>> engines; // retain engines |
| 39 | }; |
| 40 | |
| 41 | }}} // namespace ppl::nn::python |
| 42 |
no outgoing calls
no test coverage detected