Expand description
Explicit host ↔ device buffer abstraction (plan #59).
Borrowed from MAX’s max/python/max/driver/buffer.py. The point
is explicitness: every host↔device transfer is a method call,
not implicit conversion. Misreading “device” data as host (or
vice versa) becomes a compile error, not a silent perf bug.
Today this wraps a host-side Vec<u8> plus a Device tag. The
to_host / to_device calls are no-ops on Device::Cpu; on
Device::Metal a future commit will route through the existing
rlx-metal::arena for actual MTLBuffer transfers.
Structs§
- Buffer
- A buffer that knows where its bytes live.