pub struct PlanPreference<'comm> { /* private fields */ }Implementations§
Source§impl<'comm> PlanPreference<'comm>
impl<'comm> PlanPreference<'comm>
pub fn create( context: &Context<'comm>, algorithm: Algorithm, device_workspace_limit: u64, host_workspace_limit: u64, ) -> Result<Self>
Sourcepub unsafe fn from_raw(
handle: cutensorMpPlanPreference_t,
context: &Context<'comm>,
algorithm: Algorithm,
device_workspace_limit: u64,
host_workspace_limit: u64,
) -> Result<Self>
pub unsafe fn from_raw( handle: cutensorMpPlanPreference_t, context: &Context<'comm>, algorithm: Algorithm, device_workspace_limit: u64, host_workspace_limit: u64, ) -> Result<Self>
Wraps an existing cuTENSORMp plan preference.
§Safety
handle must be a valid cuTENSORMp plan preference associated with
context. Metadata arguments must describe the raw preference. The
returned value takes ownership of handle and destroys it on drop.
pub fn algorithm(&self) -> Algorithm
pub fn device_workspace_limit(&self) -> u64
pub fn host_workspace_limit(&self) -> u64
pub const fn as_raw(&self) -> cutensorMpPlanPreference_t
Sourcepub fn into_raw(self) -> cutensorMpPlanPreference_t
pub fn into_raw(self) -> cutensorMpPlanPreference_t
Consumes this preference and returns the owned raw cuTENSORMp plan preference.
The caller becomes responsible for destroying the preference.
Trait Implementations§
Source§impl<'comm> Debug for PlanPreference<'comm>
impl<'comm> Debug for PlanPreference<'comm>
Source§impl Drop for PlanPreference<'_>
impl Drop for PlanPreference<'_>
Auto Trait Implementations§
impl<'comm> !Send for PlanPreference<'comm>
impl<'comm> !Sync for PlanPreference<'comm>
impl<'comm> Freeze for PlanPreference<'comm>
impl<'comm> RefUnwindSafe for PlanPreference<'comm>
impl<'comm> Unpin for PlanPreference<'comm>
impl<'comm> UnsafeUnpin for PlanPreference<'comm>
impl<'comm> UnwindSafe for PlanPreference<'comm>
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