MCPcopy Create free account
hub / github.com/pytorch/pytorch / _child_base_id

Method _child_base_id

caffe2/python/schema.py:174–180  ·  view source on GitHub ↗

Get the base id of the given child

(self, child_index=None)

Source from the content-addressed store, hash-verified

172 return slice(base_id, base_id + len(self.field_names()))
173
174 def _child_base_id(self, child_index=None):
175 """Get the base id of the given child"""
176 p, i = self._parent
177 pos = 0 if child_index is None else self._field_offsets[child_index]
178 if p:
179 pos += p._child_base_id(i)
180 return pos
181
182 def __eq__(self, other):
183 """Equivalance of two schemas"""

Callers 2

sliceMethod · 0.95
idMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected