pub enum ArrayFormat {
UnsignedInt8,
UnsignedInt16,
UnsignedInt32,
SignedInt8,
SignedInt16,
SignedInt32,
Half,
Float,
}Expand description
Element format for each channel in a CUDA array.
Mirrors cudaChannelFormatKind / CUarray_format.
Variants§
UnsignedInt8
8-bit unsigned integer.
UnsignedInt16
16-bit unsigned integer.
UnsignedInt32
32-bit unsigned integer.
SignedInt8
8-bit signed integer.
SignedInt16
16-bit signed integer.
SignedInt32
32-bit signed integer.
Half
16-bit float (half precision).
Float
32-bit float (single precision).
Implementations§
Source§impl ArrayFormat
impl ArrayFormat
Sourcepub const fn as_cu_format(self) -> CUarray_format
pub const fn as_cu_format(self) -> CUarray_format
Convert to the driver-API CUarray_format.
Sourcepub const fn bytes_per_channel(self) -> usize
pub const fn bytes_per_channel(self) -> usize
Element byte width for one channel.
Trait Implementations§
Source§impl Clone for ArrayFormat
impl Clone for ArrayFormat
Source§fn clone(&self) -> ArrayFormat
fn clone(&self) -> ArrayFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArrayFormat
impl Debug for ArrayFormat
Source§impl Hash for ArrayFormat
impl Hash for ArrayFormat
Source§impl PartialEq for ArrayFormat
impl PartialEq for ArrayFormat
impl Copy for ArrayFormat
impl Eq for ArrayFormat
impl StructuralPartialEq for ArrayFormat
Auto Trait Implementations§
impl Freeze for ArrayFormat
impl RefUnwindSafe for ArrayFormat
impl Send for ArrayFormat
impl Sync for ArrayFormat
impl Unpin for ArrayFormat
impl UnsafeUnpin for ArrayFormat
impl UnwindSafe for ArrayFormat
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