Expand description
TensorSliceView — zero-copy logical views into tensor data via
offset+stride descriptors, supporting slicing, broadcasting, and element
access without data duplication.
§Overview
A TensorSliceView holds a flat Vec<f64> as the backing store and a
ViewDescriptor that describes the logical shape, strides, and starting
offset into that store. All slice and broadcast operations return new
descriptors that share the same flat buffer – no data is ever copied.
§Key types
| Type | Purpose |
|---|---|
SliceRange | A half-open [start, stop) range with a step |
ViewDescriptor | Offset + shape + strides descriptor for a view |
BroadcastShape | NumPy-style broadcast compatibility and stride computation |
SliceViewStats | Cumulative counters for views, slices, and broadcasts |
TensorSliceView | The main manager that owns the data and exposes the API |
Structs§
- Broadcast
Shape - NumPy-style broadcast compatibility checker and stride generator.
- Slice
Range - A half-open range
[start, stop)with a positivestep. - Slice
View Stats - Cumulative statistics for a
TensorSliceView. - Tensor
Slice View - Zero-copy logical view manager over a flat
f64data buffer. - View
Descriptor - Describes a logical view into a flat buffer via an offset, shape, and strides.