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

Method CreateMapBaseData

src/ffi/extra/serialization.cc:185–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 json::Array CreateMapBaseData(const MapBaseObj* value) {
186 json::Array data;
187 data.reserve(static_cast<int64_t>(value->size()) * 2);
188 for (const auto& [key, val] : *value) {
189 data.push_back(GetOrCreateNodeIndex(key));
190 data.push_back(GetOrCreateNodeIndex(val));
191 }
192 return data;
193 }
194
195 // create the data for the object, if the type has a custom data to json function,
196 // use it. otherwise, we go over the fields and create the data.

Callers

nothing calls this directly

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected