pub enum Writer<Out: NumericVector> {
Parallel(ParallelWriter<Out>),
Perpendicular(PerpendicularWriter<Out>),
}Expand description
Abstract how data is written to global memory.
Depending on the problem kind, writes might be buffered to optimize vectorization, only happening when Writer::commit() is called.
Variants§
Implementations§
Source§impl<Out: NumericVector> Writer<Out>
impl<Out: NumericVector> Writer<Out>
pub fn new_Parallel(_0: ParallelWriter<Out>) -> Self
pub fn __expand_new_Parallel( _: &mut Scope, _0: <ParallelWriter<Out> as RudaType>::ExpandType, ) -> WriterExpand<Out>
pub fn new_Perpendicular(_0: PerpendicularWriter<Out>) -> Self
pub fn __expand_new_Perpendicular( _: &mut Scope, _0: <PerpendicularWriter<Out> as RudaType>::ExpandType, ) -> WriterExpand<Out>
Source§impl<Out: NumericVector> Writer<Out>
impl<Out: NumericVector> Writer<Out>
pub fn new<P: ReducePrecision>( input: &VirtualTensor<P::EI, P::SI>, output: &mut VirtualTensor<Out::T, Out::N, ReadWrite>, reduce_axis: usize, out_vec_axis: usize, write_index: usize, vectorization_mode: VectorizationMode, acc_format: AccumulatorFormat, ) -> Writer<Out>
pub fn write<P: ReducePrecision, I: ReduceInstruction<P>>( &mut self, local_index: usize, accumulator: Accumulator<P>, inst: &I, )
pub fn commit_required(&self) -> bool
pub fn commit(&mut self)
pub fn write_count(&self) -> VectorSize
pub fn __expand_new<P: ReducePrecision>( scope: &mut Scope, input: <VirtualTensor<P::EI, P::SI> as RudaType>::ExpandType, output: <VirtualTensor<Out::T, Out::N, ReadWrite> as RudaType>::ExpandType, reduce_axis: <usize as RudaType>::ExpandType, out_vec_axis: <usize as RudaType>::ExpandType, write_index: <usize as RudaType>::ExpandType, vectorization_mode: VectorizationMode, acc_format: AccumulatorFormat, ) -> <Writer<Out> as RudaType>::ExpandType
pub fn __expand_write<P: ReducePrecision, I: ReduceInstruction<P>>( scope: &mut Scope, this: <Self as RudaType>::ExpandType, local_index: <usize as RudaType>::ExpandType, accumulator: <Accumulator<P> as RudaType>::ExpandType, inst: <I as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType
pub fn __expand_commit_required( scope: &mut Scope, this: <Self as RudaType>::ExpandType, ) -> bool
pub fn __expand_commit( scope: &mut Scope, this: <Self as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType
pub fn __expand_write_count( scope: &mut Scope, this: <Self as RudaType>::ExpandType, ) -> VectorSize
Trait Implementations§
Source§impl<Out: NumericVector> RudaDebug for Writer<Out>
impl<Out: NumericVector> RudaDebug for Writer<Out>
Source§fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
Set the debug name of this type’s expansion. Should do nothing for types that don’t appear
at runtime
Source§impl<Out: NumericVector> RudaType for Writer<Out>
impl<Out: NumericVector> RudaType for Writer<Out>
type ExpandType = WriterExpand<Out>
Auto Trait Implementations§
impl<Out> Freeze for Writer<Out>
impl<Out> RefUnwindSafe for Writer<Out>where
ParallelWriter<Out>: RefUnwindSafe,
PerpendicularWriter<Out>: RefUnwindSafe,
impl<Out> Send for Writer<Out>
impl<Out> Sync for Writer<Out>
impl<Out> Unpin for Writer<Out>
impl<Out> UnsafeUnpin for Writer<Out>where
ParallelWriter<Out>: UnsafeUnpin,
PerpendicularWriter<Out>: UnsafeUnpin,
impl<Out> UnwindSafe for Writer<Out>where
ParallelWriter<Out>: UnwindSafe,
PerpendicularWriter<Out>: 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