Returns the memory manager for a given target * * @param[in] ctx Graph context containing memory management metadata * @param[in] target Target to retrieve the memory manager from * * @return The memory manager for the given target else false */
| 91 | * @return The memory manager for the given target else false |
| 92 | */ |
| 93 | inline std::shared_ptr<IMemoryManager> get_memory_manager(GraphContext &ctx, Target target) |
| 94 | { |
| 95 | bool enabled = ctx.config().use_function_memory_manager && (ctx.memory_management_ctx(target) != nullptr); |
| 96 | return enabled ? ctx.memory_management_ctx(target)->intra_mm : nullptr; |
| 97 | } |
| 98 | |
| 99 | /** Returns the weights manager for a given target |
| 100 | * |
no test coverage detected