fn put_numeric_type(
    out: &mut impl Write,
    kind: crate::ScalarKind,
    sizes: &[crate::VectorSize],
) -> Result<(), FmtError> {
    match (kind, sizes) {
        (kind, &[]) => {
            write!(out, "{}", kind.to_msl_name())
        }
        (kind, &[rows]) => {
            write!(
                out,
                "{}::{}{}",
                NAMESPACE,
                kind.to_msl_name(),
                back::vector_size_str(rows)
            )
        }
        (kind, &[rows, columns]) => {
            write!(
                out,
                "{}::{}{}x{}",
                NAMESPACE,
                kind.to_msl_name(),
                back::vector_size_str(columns),
                back::vector_size_str(rows)
            )
        }
        (_, _) => Ok(()), // not meaningful
    }
}
/// Write the Metal name for a Naga numeric type: scalar, vector, or matrix.
///
/// The `sizes` slice determines whether this function writes a
/// scalar, vector, or matrix type:
///
/// - An empty slice produces a scalar type.
/// - A one-element slice produces a vector type.
/// - A two element slice `[ROWS COLUMNS]` produces a matrix of the given size.
Write the Metal name for a Naga numeric type: scalar, vector, or matrix.
The `sizes` slice determines whether this function writes a
scalar, vector, or matrix type.

An empty slice produces a scalar type.
A one-element slice produces a vector type.
A two element slice `[ROWS COLUMNS]` produces a matrix of the given size.
Write the Metal name for a Naga numeric type : scalar vector or matrix . The ` sizes ` slice determines whether this function writes a scalar vector or matrix type . An empty slice produces a scalar type . A one - element slice produces a vector type . A two element slice ` [ ROWS COLUMNS ] ` produces a matrix of the given size .
fn put_numeric_type(
    out: &mut impl Write,
    kind: crate::ScalarKind,
    sizes: &[crate::VectorSize],
) -> Result<(), FmtError> {
    match (kind, sizes) {
        (kind, &[]) => {
            write!(out, "{}", kind.to_msl_name())
        }
        (kind, &[rows]) => {
            write!(
                out,
                "{}::{}{}",
                NAMESPACE,
                kind.to_msl_name(),
                back::vector_size_str(rows)
            )
        }
        (kind, &[rows, columns]) => {
            write!(
                out,
                "{}::{}{}x{}",
                NAMESPACE,
                kind.to_msl_name(),
                back::vector_size_str(columns),
                back::vector_size_str(rows)
            )
        }
        (_, _) => Ok(()), // not meaningful
    }
}
fn put_numeric_type ( out : & mut impl Write , kind : crate :: ScalarKind , sizes : & [ crate :: VectorSize ] , ) -> Result < ( ) , FmtError > { match ( kind , sizes ) { ( kind , & [ ] ) => { write ! ( out " " kind to_msl_name ( ) ) } ( kind , & [ rows ] ) => { write ! ( out " " NAMESPACE kind to_msl_name ( ) back vector_size_str ( rows ) ) } ( kind , & [ rows , columns ] ) => { write ! ( out " " NAMESPACE kind to_msl_name ( ) back vector_size_str ( columns ) back vector_size_str ( rows ) ) } ( _ , _ ) => Ok ( ( ) ) , // not meaningful } }
Write the Metal name for a Naga numeric type: scalar, vector, or matrix.
Write the Metal name for a Naga numeric type : scalar vector or matrix .
out
&mut impl Write
kind
crate::ScalarKind
sizes
&[crate::VectorSize]
out
&mut impl Write
kind
crate::ScalarKind
sizes
&[crate::VectorSize]