pub enum Type {
Scalar(StorageType),
Line(StorageType, u32),
Semantic(SemanticType),
}Variants§
Scalar(StorageType)
Scalar type containing a single storage element
Line(StorageType, u32)
Line wrapping n storage elements
Semantic(SemanticType)
No defined physical representation, purely semantic. i.e. barrier, pipeline
Implementations§
Source§impl Type
impl Type
Sourcepub fn new(storage: StorageType) -> Self
pub fn new(storage: StorageType) -> Self
Create a new item
pub fn scalar(elem: ElemType) -> Self
pub fn semantic(ty: SemanticType) -> Self
pub fn line(self, line_size: LineSize) -> Type
pub fn line_size(&self) -> u32
pub fn size(&self) -> usize
pub fn size_bits(&self) -> usize
pub fn is_atomic(&self) -> bool
pub fn is_int(&self) -> bool
pub fn is_signed_int(&self) -> bool
pub fn is_unsigned_int(&self) -> bool
pub fn is_float(&self) -> bool
pub fn storage_type(&self) -> StorageType
pub fn is_semantic(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SemanticType> for Type
impl From<SemanticType> for Type
Source§fn from(val: SemanticType) -> Self
fn from(val: SemanticType) -> Self
Converts to this type from the input type.
Source§impl From<StorageType> for Type
impl From<StorageType> for Type
Source§fn from(val: StorageType) -> Self
fn from(val: StorageType) -> Self
Converts to this type from the input type.
Source§impl Ord for Type
impl Ord for Type
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.