✓
Passing This code compiles and runs correctly.
Code
// TEST: kernel layout metadata (aspirational)
//
// Goal:
// 1. The kernel view should expose a layout hint (AoS/SoA/Hybrid)
// 2. The compiler should fill this from analysis of the continuation subtree
//
// NOTE: layout is currently stubbed to "aos" until analysis is implemented.
// This test verifies that computed branch receives correct slice length.
~import std/kernel
~import std/io
~std/kernel:shape(Body) {
x: f64,
y: f64,
mass: f64,
}
~std/kernel:init(Body) {
{ x: 0.0, y: 0.0, mass: 1.0 },
{ x: 1.0, y: 0.0, mass: 2.0 },
}
| kernel k |> std/kernel:self { k.mass *= 1.0 }
| computed c |> std/io:print.blk {
slice len={{ c.len:d }}, mass[0]={{ c[0].mass:f }}
}
Actual
slice len=2, mass[0]=1
Expected output
slice len=2, mass[0]=1
Test Configuration
MUST_RUN