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

Method CustomAnyHash

tests/cpp/testing_object.h:129–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 explicit TFloat(double value) { data_ = make_object<TFloatObj>(value); }
128
129 static uint64_t CustomAnyHash(const Any& src) {
130 double value = src.cast<TFloat>()->value;
131 return static_cast<int64_t>(value * 10 + 2048);
132 }
133
134 static bool CustomAnyEqual(const Any& lhs, const Any& rhs) {
135 return lhs.cast<TFloat>()->value == rhs.cast<TFloat>()->value;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected