MCPcopy Index your code
hub / github.com/apache/tvm / register

Method register

jvm/core/src/main/java/org/apache/tvm/Function.java:260–265  ·  view source on GitHub ↗

Register user-defined global function. @param name The function name. @param function The function to be registered. @param override Whether override existing entry.

(String name, Callback function, boolean override)

Source from the content-addressed store, hash-verified

258 * @param override Whether override existing entry.
259 */
260 public static void register(String name, Callback function, boolean override) {
261 Base.RefLong createdFuncHandleRef = new Base.RefLong();
262 Base.checkCall(Base._LIB.tvmFFIFunctionCreateFromCallback(function, createdFuncHandleRef));
263 int ioverride = override ? 1 : 0;
264 Base.checkCall(Base._LIB.tvmFFIFunctionSetGlobal(name, createdFuncHandleRef.value, ioverride));
265 }
266
267 /**
268 * Register user-defined global function, do not override existing entry.

Callers 5

test_reg_sum_numberMethod · 0.95
test_addoneMethod · 0.95
test_strcatMethod · 0.95
serverEnvMethod · 0.95

Calls 3

checkCallMethod · 0.95

Tested by 4

test_reg_sum_numberMethod · 0.76
test_addoneMethod · 0.76
test_strcatMethod · 0.76