pub struct SegmentMinPlan<T: Element> { /* private fields */ }Expand description
segment_min plan (sorted, FW only).
out[s, d] = min_{n : segment_ids[n] == s} input[n, d]. Sorted
segment-min mirror of SegmentMaxPlan.
When to use: forward sorted segment-min. No BW plan — argmin tracking deferred.
Dtypes: {f32, f64}.
Shape limits: input [N, D]; segment_ids [N];
output [num_segments, D].
Workspace: none.
Precision guarantee: deterministic, bit-stable.
Index policy: out-of-range IDs dropped. Empty segments emit the per-op identity sentinel.
Implementations§
Source§impl<T: Element> SegmentMinPlan<T>
impl<T: Element> SegmentMinPlan<T>
Sourcepub fn select(
_stream: &Stream,
desc: &SegmentMinDescriptor,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &SegmentMinDescriptor, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel.
Sourcepub fn can_implement(&self, args: &SegmentMinArgs<'_, T>) -> Result<()>
pub fn can_implement(&self, args: &SegmentMinArgs<'_, T>) -> Result<()>
Validate args.
Sourcepub fn workspace_size(&self) -> usize
pub fn workspace_size(&self) -> usize
Workspace size — zero.
Sourcepub fn precision_guarantee(&self) -> PrecisionGuarantee
pub fn precision_guarantee(&self) -> PrecisionGuarantee
Numerical guarantees.
Auto Trait Implementations§
impl<T> Freeze for SegmentMinPlan<T>
impl<T> RefUnwindSafe for SegmentMinPlan<T>where
T: RefUnwindSafe,
impl<T> Send for SegmentMinPlan<T>where
T: Send,
impl<T> Sync for SegmentMinPlan<T>where
T: Sync,
impl<T> Unpin for SegmentMinPlan<T>where
T: Unpin,
impl<T> UnsafeUnpin for SegmentMinPlan<T>
impl<T> UnwindSafe for SegmentMinPlan<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more