pub struct AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef> { /* private fields */ }
Expand description
| Pulls in slices of the input tensor,
| groups them into segments and applies
| ‘{op}’ to each segment. Segments need
| to be sorted and contiguous. See also
|
| SparseUnsortedSegment{op} that doesn’t
| have this requirement.
|
| This op is basically Gather and SortedSegment{op}
| fused together.
|
| INDICES should contain integers in
| range 0..N-1 where N is the first dimension
| of DATA. INDICES represent which slices
| of DATA need to be pulled in.
|
| SEGMENT_IDS is a vector that maps each
| referenced slice of the DATA to a particular
| group (segment). Values belonging
| to the same segment are aggregated together.
| SEGMENT_IDS should have the same dimension
| as INDICES.
|
| The first dimension of the output is
| equal to the number of input segments,
| i.e. SEGMENT_IDS[-1]+1
. Other dimensions
| are inherited from the input tensor.
|
| {op_doc}
|
Implementations§
source§impl<T, SIndex, Context, ReducerDef> AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>
impl<T, SIndex, Context, ReducerDef> AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>
pub fn populate_schema(schema: &mut OpSchema)
Auto Trait Implementations§
impl<T, SIndex, Context, ReducerDef> RefUnwindSafe for AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>where Context: RefUnwindSafe, ReducerDef: RefUnwindSafe, SIndex: RefUnwindSafe, T: RefUnwindSafe,
impl<T, SIndex, Context, ReducerDef> Send for AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>where Context: Send, ReducerDef: Send, SIndex: Send, T: Send,
impl<T, SIndex, Context, ReducerDef> Sync for AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>where Context: Sync, ReducerDef: Sync, SIndex: Sync, T: Sync,
impl<T, SIndex, Context, ReducerDef> Unpin for AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>where Context: Unpin, ReducerDef: Unpin, SIndex: Unpin, T: Unpin,
impl<T, SIndex, Context, ReducerDef> UnwindSafe for AbstractSparseSortedSegmentDef<T, SIndex, Context, ReducerDef>where Context: UnwindSafe, ReducerDef: UnwindSafe, SIndex: UnwindSafe, T: UnwindSafe,
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.