Skip to main content

ChunkOffsetsView

Type Alias ChunkOffsetsView 

Source
pub type ChunkOffsetsView<'a> = ChunkOffsetsBase<&'a [usize]>;

Aliased Type§

pub struct ChunkOffsetsView<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ChunkOffsetsView<'a>

Source

pub fn partition_into( dim: NonZeroUsize, scratch: &'a mut [usize], ) -> Result<Self, PartitionIntoError>

Fill the caller-owned scratch buffer with the partition for dim into scratch.len() - 1 chunks and return a validated view borrowing it.

See ChunkOffsets::partition for the partitioning rule.

Returns an error if scratch.len() < 2 or if the requested partition is not valid (e.g. scratch.len() - 1 > dim.get()).