vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::lower::wgsl::Error;

#[inline]
pub(crate) fn axis_letter(axis: u8) -> Result<char, Error> {
    match axis {
        0 => Ok('x'),
        1 => Ok('y'),
        2 => Ok('z'),
        _ => Err(Error::lowering(format!(
            "invocation axis {axis} is out of range. Fix: use axis 0, 1, or 2."
        ))),
    }
}