pub struct CopyPlan { /* private fields */ }Implementations§
Source§impl CopyPlan
impl CopyPlan
pub fn create( context: &Context, desc: &CopyDescriptor, workspace: Workspace, ) -> Result<Self>
Sourcepub unsafe fn from_raw(
handle: cutensorMgCopyPlan_t,
context: &Context,
dst_pointer_count: usize,
src_pointer_count: usize,
workspace: Workspace,
) -> Result<Self>
pub unsafe fn from_raw( handle: cutensorMgCopyPlan_t, context: &Context, dst_pointer_count: usize, src_pointer_count: usize, workspace: Workspace, ) -> Result<Self>
Wraps an existing cuTENSORMg copy plan.
§Safety
handle must be a valid cuTENSORMg copy plan associated with context
and workspace. Pointer counts must match the descriptors used to
create the plan. The returned value takes ownership of handle and
destroys it on drop.
pub fn workspace(&self) -> &Workspace
Sourcepub unsafe fn copy_raw(
&self,
dst: &mut [*mut ()],
src: &[*const ()],
device_workspace: &mut [*mut ()],
host_workspace: *mut (),
streams: &[StreamBinding],
) -> Result<()>
pub unsafe fn copy_raw( &self, dst: &mut [*mut ()], src: &[*const ()], device_workspace: &mut [*mut ()], host_workspace: *mut (), streams: &[StreamBinding], ) -> Result<()>
Executes this copy plan with raw distributed tensor pointers.
§Safety
The pointer arrays must match the tensor descriptors used to create the plan. Device workspace pointers and streams must be ordered like the MG context devices.
pub const fn as_raw(&self) -> cutensorMgCopyPlan_t
Sourcepub fn into_raw(self) -> cutensorMgCopyPlan_t
pub fn into_raw(self) -> cutensorMgCopyPlan_t
Consumes this plan and returns the owned raw cuTENSORMg copy plan.
The caller becomes responsible for destroying the plan.
Trait Implementations§
Auto Trait Implementations§
impl !Send for CopyPlan
impl !Sync for CopyPlan
impl Freeze for CopyPlan
impl RefUnwindSafe for CopyPlan
impl Unpin for CopyPlan
impl UnsafeUnpin for CopyPlan
impl UnwindSafe for CopyPlan
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