pub struct Region<'a, T, S: PartitioningStrategy> { /* private fields */ }🔬This is a nightly-only experimental API. (
gpu_offload #131513)Expand description
A memory region bound to a partitioning strategy.
Implementations§
Source§impl<'a, T, S: PartitioningStrategy> Region<'a, T, S>
impl<'a, T, S: PartitioningStrategy> Region<'a, T, S>
Sourcepub fn new<D>(data: D) -> Self
🔬This is a nightly-only experimental API. (gpu_offload #131513)
pub fn new<D>(data: D) -> Self
gpu_offload #131513)Creates a new partitioned region from data convertible into a RawRegion.
Sourcepub fn get(&self) -> Option<S::View<'_, T>>
🔬This is a nightly-only experimental API. (gpu_offload #131513)
pub fn get(&self) -> Option<S::View<'_, T>>
gpu_offload #131513)Returns a read-only view for the current execution context.
Sourcepub fn get_mut(&mut self) -> Option<S::ViewMut<'_, T>>
🔬This is a nightly-only experimental API. (gpu_offload #131513)
pub fn get_mut(&mut self) -> Option<S::ViewMut<'_, T>>
gpu_offload #131513)Returns a mutable view for the current execution context.
Sourcepub fn check_launch(
&self,
grid: [u32; 3],
block: [u32; 3],
) -> Result<(), LaunchError>
🔬This is a nightly-only experimental API. (gpu_offload #131513)
pub fn check_launch( &self, grid: [u32; 3], block: [u32; 3], ) -> Result<(), LaunchError>
gpu_offload #131513)Checks that this region can be launched with the given configuration.
Called automatically by the offload! macro before launching a kernel.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, S> !Send for Region<'a, T, S>
impl<'a, T, S> !Sync for Region<'a, T, S>
impl<'a, T, S> !UnwindSafe for Region<'a, T, S>
impl<'a, T, S> Freeze for Region<'a, T, S>
impl<'a, T, S> RefUnwindSafe for Region<'a, T, S>
impl<'a, T, S> Unpin for Region<'a, T, S>
impl<'a, T, S> UnsafeUnpin for Region<'a, T, S>
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