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

Method DecodeMapLikeData

src/ffi/extra/serialization.cc:356–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354
355 template <typename MapType>
356 MapType DecodeMapLikeData(const json::Array& data) {
357 MapType result;
358 const int64_t n = static_cast<int64_t>(data.size());
359 for (int64_t i = 0; i < n; i += 2) {
360 int64_t key_index = data[i].cast<int64_t>();
361 int64_t value_index = data[i + 1].cast<int64_t>();
362 result.Set(GetOrDecodeNode(key_index), GetOrDecodeNode(value_index));
363 }
364 return result;
365 }
366
367 Any DecodeObjectData(int32_t type_index, const json::Value& data) {
368 static reflection::TypeAttrColumn data_from_json =

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected