| 207 | } |
| 208 | |
| 209 | int LITE_make_network( |
| 210 | LiteNetwork* network, const LiteConfig config, const LiteNetworkIO network_io) { |
| 211 | LITE_CAPI_BEGIN(); |
| 212 | LITE_ASSERT(network, "The network pass to LITE api is null"); |
| 213 | auto lite_network = std::make_shared<lite::Network>( |
| 214 | convert_to_lite_config(config), convert_to_lite_io(network_io)); |
| 215 | LITE_LOCK_GUARD(mtx_network); |
| 216 | get_gloabl_network_holder()[lite_network.get()] = lite_network; |
| 217 | *network = lite_network.get(); |
| 218 | LITE_CAPI_END(); |
| 219 | } |
| 220 | |
| 221 | int LITE_make_network_config(LiteNetwork* network, const LiteConfig config) { |
| 222 | LITE_CAPI_BEGIN(); |