Struct necsim_impls_cuda::event_buffer::EventBuffer
source · pub struct EventBuffer<ReportSpeciation: Boolean, ReportDispersal: Boolean> { /* private fields */ }
Implementations§
source§impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> EventBuffer<ReportSpeciation, ReportDispersal>
sourcepub fn new(
block_size: &BlockSize,
grid_size: &GridSize,
max_events: usize
) -> CudaResult<Self>
pub fn new( block_size: &BlockSize, grid_size: &GridSize, max_events: usize ) -> CudaResult<Self>
§Errors
Returns a rustacuda::errors::CudaError
iff an error occurs inside CUDA
pub fn report_events_unordered<P>(&mut self, reporter: &mut P)where
P: Reporter<ReportSpeciation = ReportSpeciation, ReportDispersal = ReportDispersal>,
Trait Implementations§
source§impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> Debug for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> Debug for EventBuffer<ReportSpeciation, ReportDispersal>
source§impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> EventType for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> EventType for EventBuffer<ReportSpeciation, ReportDispersal>
source§impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> RustToCuda for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> RustToCuda for EventBuffer<ReportSpeciation, ReportDispersal>
type CudaRepresentation = EventBufferCudaRepresentation<ReportSpeciation, ReportDispersal>
type CudaAllocation = CombinedCudaAlloc<<SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<MaybeSome<<EventBuffer<ReportSpeciation, ReportDispersal> as EventType>::Event>, false, true>> as RustToCuda>::CudaAllocation, CombinedCudaAlloc<<SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<bool, true, true>> as RustToCuda>::CudaAllocation, NoCudaAlloc>>
source§impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> RustToCudaAsync for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> RustToCudaAsync for EventBuffer<ReportSpeciation, ReportDispersal>
type CudaAllocationAsync = CombinedCudaAlloc<<SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<MaybeSome<<EventBuffer<ReportSpeciation, ReportDispersal> as EventType>::Event>, false, true>> as RustToCudaAsync>::CudaAllocationAsync, CombinedCudaAlloc<<SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<bool, true, true>> as RustToCudaAsync>::CudaAllocationAsync, NoCudaAlloc>>
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean> SafeMutableAliasing for EventBuffer<ReportSpeciation, ReportDispersal>where
SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<bool, true, true>>: SafeMutableAliasing,
SplitSliceOverCudaThreadsDynamicStride<CudaExchangeBuffer<MaybeSome<<EventBuffer<ReportSpeciation, ReportDispersal> as EventType>::Event>, false, true>>: SafeMutableAliasing,
Auto Trait Implementations§
impl<ReportSpeciation, ReportDispersal> !Freeze for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation, ReportDispersal> !RefUnwindSafe for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation, ReportDispersal> !Send for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation, ReportDispersal> Sync for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation, ReportDispersal> Unpin for EventBuffer<ReportSpeciation, ReportDispersal>
impl<ReportSpeciation, ReportDispersal> !UnwindSafe for EventBuffer<ReportSpeciation, ReportDispersal>
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
§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read moresource§impl<T> LendToCuda for Twhere
T: RustToCuda,
impl<T> LendToCuda for Twhere
T: RustToCuda,
source§fn lend_to_cuda<O, E, F>(&self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync,
fn lend_to_cuda<O, E, F>(&self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync,
Lends an immutable borrow of
&self
to CUDA: Read moresource§fn lend_to_cuda_mut<O, E, F>(&mut self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync + SafeMutableAliasing,
fn lend_to_cuda_mut<O, E, F>(&mut self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync + SafeMutableAliasing,
source§fn move_to_cuda<O, E, F>(self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceOwned<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Send + RustToCuda,
<T as RustToCuda>::CudaRepresentation: StackOnly,
<T as RustToCuda>::CudaAllocation: EmptyCudaAlloc,
fn move_to_cuda<O, E, F>(self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceOwned<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Send + RustToCuda,
<T as RustToCuda>::CudaRepresentation: StackOnly,
<T as RustToCuda>::CudaAllocation: EmptyCudaAlloc,
source§impl<T> LendToCudaAsync for Twhere
T: RustToCudaAsync,
impl<T> LendToCudaAsync for Twhere
T: RustToCudaAsync,
source§fn lend_to_cuda_async<'stream, O, E, F>(
&self,
stream: Stream<'stream>,
inner: F
) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(Async<'_, 'stream, HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>,
T: Sync,
fn lend_to_cuda_async<'stream, O, E, F>(
&self,
stream: Stream<'stream>,
inner: F
) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(Async<'_, 'stream, HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>,
T: Sync,
Lends an immutable copy of
&self
to CUDA: Read more