Expand description
Runtime element type tag for typed device buffers.
Used by the typed buffer handles (MetalBuf, CpuBuf, CudaBuf)
to carry a dtype alongside the raw byte storage. This lets the
existing Backend trait surface (which today exposes a monomorphic
Self::Buffer and a pile of from_slice_i32 / alloc_u32 /
write_u32 / from_slice_f32 etc. helpers) move toward a single
Self::alloc(Dtype, n) / Self::write(buf, &[T]) API without
breaking callers in one PR.
Phase A (PR A): defined here + Metal MetalBuf re-uses it (was
Metal-internal previously). CPU CpuBuf and CUDA CudaBuf not
yet wired — see Phase B for the migration.
Enums§
Traits§
- Host
Dtype - Marker trait connecting a host element type
Tto its runtimeDtypetag. Used by the typed Backend allocator + uploader so the trait surface has ONEalloc_typed(Dtype, n)/from_slice_typed<T>(&[T])/write_typed<T>(buf, &[T])instead of the per-dtype-named family (alloc_u32,from_slice_i32,write_i32_into,write_f32_into, …).