! * \brief Set global function by name * \param name The name of the function * \param func The function * \param override Whether to override when there is duplication. */
| 497 | * \param override Whether to override when there is duplication. |
| 498 | */ |
| 499 | static void SetGlobal(std::string_view name, |
| 500 | Function func, // NOLINT(performance-unnecessary-value-param) |
| 501 | bool override = false) { |
| 502 | TVMFFIByteArray name_arr{name.data(), name.size()}; |
| 503 | TVM_FFI_CHECK_SAFE_CALL( |
| 504 | TVMFFIFunctionSetGlobal(&name_arr, details::ObjectUnsafe::GetHeader(func.get()), override)); |
| 505 | } |
| 506 | /*! |
| 507 | * \brief List all global names |
| 508 | * \return A vector of all global names |
nothing calls this directly
no test coverage detected