pub struct MemorySetNodeParams { /* private fields */ }Expand description
Raw destination, geometry, and fill value for a graph memset node.
These parameters do not retain the destination allocation. Its owner must outlive every graph replay that uses the stored address.
Implementations§
Source§impl MemorySetNodeParams
impl MemorySetNodeParams
Sourcepub const unsafe fn new(dst: DevicePtr, element_size: u32, width: usize) -> Self
pub const unsafe fn new(dst: DevicePtr, element_size: u32, width: usize) -> Self
Creates raw memset node parameters.
§Safety
dst must be valid for writes of element_size * width bytes when the graph executes.
If height or pitch are changed after construction, the caller must account for those values as required by CUDA.
Sourcepub const fn with_pitch(self, pitch: usize) -> Self
pub const fn with_pitch(self, pitch: usize) -> Self
Sets the row stride in bytes without validating the destination range.
Sourcepub const fn with_value(self, value: u32) -> Self
pub const fn with_value(self, value: u32) -> Self
Sets the fill value; CUDA uses the low bytes selected by the element size.
Sourcepub const fn with_height(self, height: usize) -> Self
pub const fn with_height(self, height: usize) -> Self
Sets the number of rows without validating the destination range.
Sourcepub const fn element_size(self) -> u32
pub const fn element_size(self) -> u32
Returns the fill element size in bytes.
Trait Implementations§
Source§impl Clone for MemorySetNodeParams
impl Clone for MemorySetNodeParams
impl Copy for MemorySetNodeParams
Source§impl Debug for MemorySetNodeParams
impl Debug for MemorySetNodeParams
Source§impl From<&MemorySetNodeParams> for CUDA_MEMSET_NODE_PARAMS
impl From<&MemorySetNodeParams> for CUDA_MEMSET_NODE_PARAMS
Source§fn from(value: &MemorySetNodeParams) -> Self
fn from(value: &MemorySetNodeParams) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Send for MemorySetNodeParams
impl !Sync for MemorySetNodeParams
impl Forget for MemorySetNodeParams
impl Freeze for MemorySetNodeParams
impl Move for MemorySetNodeParams
impl RefUnwindSafe for MemorySetNodeParams
impl Unpin for MemorySetNodeParams
impl UnsafeUnpin for MemorySetNodeParams
impl UnwindSafe for MemorySetNodeParams
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