MCPcopy Create free account
hub / github.com/apache/tvm-ffi / GetFunctionDoc

Method GetFunctionDoc

src/ffi/extra/library_module.cc:73–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 Optional<String> GetFunctionDoc(const String& name) final {
74 // Look for __tvm_ffi__doc_<name> symbol
75 String doc_symbol = symbol::tvm_ffi_doc_prefix + name;
76 void* symbol = lib_->GetSymbol(doc_symbol);
77 if (symbol != nullptr) {
78 using DocGetter = int (*)(void*, const TVMFFIAny*, int32_t, TVMFFIAny*);
79 auto doc_getter = reinterpret_cast<DocGetter>(symbol);
80 return Function::InvokeExternC(nullptr, doc_getter).cast<String>();
81 }
82 return std::nullopt;
83 }
84
85 private:
86 ObjectPtr<Library> lib_;

Callers

nothing calls this directly

Calls 1

GetSymbolMethod · 0.45

Tested by

no test coverage detected