(sz:int)
| 6 | from tinygrad.runtime.support import c |
| 7 | |
| 8 | def alloc_cbuffer(sz:int) -> tuple[ctypes.Array, memoryview]: return (buf:=(ctypes.c_ubyte * sz)()), to_mv(ctypes.addressof(buf), sz) |
| 9 | def checked(fn, msg=None): |
| 10 | @functools.wraps(fn) |
| 11 | def wrapper(*args): |