metaltile 0.1.0

Rust DSL for writing Apple Metal GPU kernels — write once, run fast on Apple Silicon
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Copyright 2026 0xClandestine, Ekryski, TheTom, Ambisphaeric
//! SPDX-License-Identifier: Apache-2.0
//! `#[kernel]` rejects `start..` (open-ended range) in `for` loops —
//! the macro needs a static upper bound to generate the IR `Loop` node.

use metaltile::prelude::*;

#[kernel]
fn loop_with_open_ended_range(out: Tensor<f32>) {
    for _i in 0u32.. {
        store(out[0u32], 0.0f32);
    }
}

fn main() {}