#[non_exhaustive]#[repr(u32)]pub enum DiagonalType {
NonUnit = 0,
Unit = 1,
}Expand description
Selects whether matrix diagonal entries are treated as unity.
The diagonal elements are always assumed to be present, but if
DiagonalType::Unit is passed to an operation, the operation assumes that
all diagonal entries are one and does not read or modify them.
This behavior is independent of the actual values stored in memory.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NonUnit = 0
The matrix diagonal has non-unit elements.
Unit = 1
The matrix diagonal has unit elements.
Trait Implementations§
Source§impl Clone for DiagonalType
impl Clone for DiagonalType
Source§fn clone(&self) -> DiagonalType
fn clone(&self) -> DiagonalType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DiagonalType
Source§impl Debug for DiagonalType
impl Debug for DiagonalType
Source§impl Display for DiagonalType
impl Display for DiagonalType
impl Eq for DiagonalType
Source§impl From<DiagonalType> for u32
impl From<DiagonalType> for u32
Source§fn from(enum_value: DiagonalType) -> Self
fn from(enum_value: DiagonalType) -> Self
Converts to this type from the input type.
Source§impl From<DiagonalType> for cusparseDiagType_t
impl From<DiagonalType> for cusparseDiagType_t
Source§fn from(value: DiagonalType) -> Self
fn from(value: DiagonalType) -> Self
Converts to this type from the input type.
Source§impl From<cusparseDiagType_t> for DiagonalType
impl From<cusparseDiagType_t> for DiagonalType
Source§fn from(value: cusparseDiagType_t) -> Self
fn from(value: cusparseDiagType_t) -> Self
Converts to this type from the input type.
Source§impl Hash for DiagonalType
impl Hash for DiagonalType
Source§impl PartialEq for DiagonalType
impl PartialEq for DiagonalType
Source§fn eq(&self, other: &DiagonalType) -> bool
fn eq(&self, other: &DiagonalType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DiagonalType
Source§impl TryFrom<u32> for DiagonalType
impl TryFrom<u32> for DiagonalType
Source§type Error = TryFromPrimitiveError<DiagonalType>
type Error = TryFromPrimitiveError<DiagonalType>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for DiagonalType
impl TryFromPrimitive for DiagonalType
const NAME: &'static str = "DiagonalType"
type Primitive = u32
type Error = TryFromPrimitiveError<DiagonalType>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for DiagonalType
impl RefUnwindSafe for DiagonalType
impl Send for DiagonalType
impl Sync for DiagonalType
impl Unpin for DiagonalType
impl UnsafeUnpin for DiagonalType
impl UnwindSafe for DiagonalType
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