vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
use super::TypeKey;
use std::sync::Arc;

#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub(crate) enum ExprKey {
    LitU32(u32),
    LitI32(i32),
    /// Stores the IEEE 754 bits so `Eq`/`Hash`/`Ord` work correctly.
    LitF32(u32),
    LitBool(bool),
    Var(Arc<str>),
    Load(Arc<str>, Box<ExprKey>),
    BufLen(Arc<str>),
    InvocationId(u8),
    WorkgroupId(u8),
    LocalId(u8),
    BinOp(u8, Box<ExprKey>, Box<ExprKey>),
    UnOp(u8, Box<ExprKey>),
    Call(Arc<str>, Vec<ExprKey>),
    Select(Box<ExprKey>, Box<ExprKey>, Box<ExprKey>),
    Cast(TypeKey, Box<ExprKey>),
    Atomic,
}