MCPcopy
hub / github.com/tinygrad/tinygrad / format_struct

Function format_struct

extra/hip_gpu_driver/test_kfd_2.py:21–27  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

19 return made
20
21def format_struct(s):
22 sdats = []
23 for field_name, field_type in s._fields_:
24 dat = getattr(s, field_name)
25 if isinstance(dat, int): sdats.append(f"{field_name}:0x{dat:X}")
26 else: sdats.append(f"{field_name}:{dat}")
27 return sdats
28
29idirs = {"IOW": 1, "IOR": 2, "IOWR": 3}
30def ioctls_from_header():

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…