MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / is_subclass_of

Function is_subclass_of

scripts/gdb/commands.py:32–38  ·  view source on GitHub ↗
(subclass, baseclass)

Source from the content-addressed store, hash-verified

30
31
32def is_subclass_of(subclass, baseclass):
33 for field in subclass.fields():
34 if field.is_base_class:
35 if field.type == baseclass:
36 return True
37 elif is_subclass_of(field.type, baseclass):
38 return True
39
40
41def vector_size(vector):

Callers 1

is_mge_frameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected