Skip to main content

Module stream

Module stream 

Source

Re-exports§

pub use reader::StreamReader;
pub use writer::StreamWriter;

Modules§

reader
writer

Structs§

AlignedDestination
What SystemDestinations hands out: one host allocation at the declared alignment.
CompositeAssembler
Rebuilds composite tensors from a stream of flat tensors.
DestinationRequest
What the core needs for one buffer of the tensor it is reading.
StreamComposite
A decoded composite tensor: its data-less head plus its ordered members.
StreamReaderCore
Decodes the Hurray stream wire format from bytes a driver supplies.
StreamReaderOptions
The limits a reader enforces on an untrusted stream.
StreamTensor
A decoded tensor: its descriptor plus its buffers.
StreamWriterCore
Encodes the Hurray stream wire format into bytes a driver writes.
SystemDestinations
The default allocator: one host allocation per buffer at the declared alignment.
WriteOp
One item being written: a tensor or a whole composite.

Enums§

CompositeNode
A node to emit as part of a composite: either a plain tensor (its descriptor plus one byte-slice per buffer) or a nested composite (its head plus its own members).
ReadStep
What the core needs next from its driver.
StreamItem
One decoded item from the stream: either a plain tensor or a composite.
Unusable
Why a core became unusable: a transport moved bytes and their count was lost, so the core’s position no longer matches the transport’s (ADR-041 § 6).
WriteStep
What the core has for its driver.

Constants§

DEFAULT_MAX_COMPOSITE_DEPTH
Default maximum composite nesting depth.
DEFAULT_MAX_DESCRIPTOR_BYTES
Default maximum descriptor size: 16 MiB.

Traits§

Destination
One buffer’s worth of memory, filled by a driver and then handed to the caller.
DestinationAlloc
Allocates the destinations a StreamReaderCore fills.