Struct necsim_impls_cuda::cogs::rng::CudaRng
source · pub struct CudaRng<M: MathsCore, R>where
R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout,{ /* private fields */ }
Trait Implementations§
source§impl<'de, M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> Deserialize<'de> for CudaRng<M, R>
impl<'de, M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> Deserialize<'de> for CudaRng<M, R>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> From<R> for CudaRng<M, R>
impl<M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> From<R> for CudaRng<M, R>
source§impl<M: MathsCore, R: PrimeableRng<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> PrimeableRng<M> for CudaRng<M, R>
impl<M: MathsCore, R: PrimeableRng<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> PrimeableRng<M> for CudaRng<M, R>
fn prime_with(&mut self, location_index: u64, time_index: u64)
source§impl<M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> RngCore<M> for CudaRng<M, R>
impl<M: MathsCore, R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout> RngCore<M> for CudaRng<M, R>
source§impl<M: MathsCore, R> RustToCuda for CudaRng<M, R>where
R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout,
impl<M: MathsCore, R> RustToCuda for CudaRng<M, R>where
R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout,
type CudaRepresentation = CudaRngCudaRepresentation<M, R>
type CudaAllocation = CombinedCudaAlloc<<RustToCudaWithPortableBitCloneSemantics<R> as RustToCuda>::CudaAllocation, NoCudaAlloc>
source§impl<M: MathsCore, R> RustToCudaAsync for CudaRng<M, R>where
R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout,
impl<M: MathsCore, R> RustToCudaAsync for CudaRng<M, R>where
R: RngCore<M> + StackOnly + PortableBitSemantics + TypeGraphLayout,
Auto Trait Implementations§
impl<M, R> Freeze for CudaRng<M, R>where
R: Freeze,
impl<M, R> RefUnwindSafe for CudaRng<M, R>where
R: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, R> Send for CudaRng<M, R>
impl<M, R> Sync for CudaRng<M, R>where
R: Sync,
impl<M, R> Unpin for CudaRng<M, R>
impl<M, R> UnwindSafe for CudaRng<M, R>where
R: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
§impl<T> Backup for Twhere
T: Clone,
impl<T> Backup for Twhere
T: Clone,
default unsafe fn backup_unchecked(&self) -> T
default unsafe fn __contracts_impl_backup_unchecked(&self) -> T
fn backup(&self) -> BackedUp<Self>
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 more§impl<M, R, H> HabitatPrimeableRng<M, H> for Rwhere
M: MathsCore,
R: PrimeableRng<M>,
H: Habitat<M>,
impl<M, R, H> HabitatPrimeableRng<M, H> for Rwhere
M: MathsCore,
R: PrimeableRng<M>,
H: Habitat<M>,
fn prime_with_habitat( &mut self, habitat: &H, indexed_location: &IndexedLocation, time_index: u64 )
source§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 moresource§fn lend_to_cuda_mut_async<'a, 'stream, O, E, F, S>(
this: OwningRefMut<'a, Box<S>, T>,
stream: Stream<'stream>,
inner: F
) -> Result<(Async<'a, 'stream, OwningRefMut<'a, Box<S>, T>, Box<dyn FnOnce(&mut T) -> Result<(), CudaError> + 'a>>, O), E>where
E: From<CudaError>,
F: for<'b> FnOnce(Async<'b, 'stream, HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>,
S: 'a,
T: Sync + SafeMutableAliasing,
fn lend_to_cuda_mut_async<'a, 'stream, O, E, F, S>(
this: OwningRefMut<'a, Box<S>, T>,
stream: Stream<'stream>,
inner: F
) -> Result<(Async<'a, 'stream, OwningRefMut<'a, Box<S>, T>, Box<dyn FnOnce(&mut T) -> Result<(), CudaError> + 'a>>, O), E>where
E: From<CudaError>,
F: for<'b> FnOnce(Async<'b, 'stream, HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>,
S: 'a,
T: Sync + SafeMutableAliasing,
source§fn move_to_cuda_async<'stream, O, E, F>(
self,
stream: Stream<'stream>,
inner: F
) -> Result<O, E>where
E: From<CudaError>,
F: for<'a> FnOnce(Async<'a, 'stream, 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_async<'stream, O, E, F>(
self,
stream: Stream<'stream>,
inner: F
) -> Result<O, E>where
E: From<CudaError>,
F: for<'a> FnOnce(Async<'a, 'stream, HostAndDeviceOwned<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>,
T: Send + RustToCuda,
<T as RustToCuda>::CudaRepresentation: StackOnly,
<T as RustToCuda>::CudaAllocation: EmptyCudaAlloc,
§impl<M, R> RngSampler<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
impl<M, R> RngSampler<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
§fn sample_uniform_closed_open(&mut self) -> ClosedOpenUnitF64
fn sample_uniform_closed_open(&mut self) -> ClosedOpenUnitF64
Samples a uniform sample within
[0.0, 1.0)
, i.e. 0.0 <= X < 1.0
§fn sample_uniform_open_closed(&mut self) -> OpenClosedUnitF64
fn sample_uniform_open_closed(&mut self) -> OpenClosedUnitF64
Samples a uniform sample within
(0.0, 1.0]
, i.e. 0.0 < X <= 1.0