004 dynamic shape

○ Planned This feature is planned but not yet implemented.

Feature: Kernel dynamic shape support

Failure Output

error[KORU010]: stray continuation line without Koru construct
  --> tests/regression/300_ADVANCED_FEATURES/390_KERNEL/390_004_dynamic_shape/input.kz:27:5
    |
 27 |     | kernel s |> std/io:print.blk {
    |     ^

Code

input.kz

Expected output

mass[0]=6, mass[1]=5, mass[2]=3

Flows

flow ~shape click a branch to expand · @labels scroll to their anchor
shape (expr: Body, source: id: u32, x: f64, y: f64, mass: f64,)
flow ~initialize click a branch to expand · @labels scroll to their anchor
initialize (Body, source: { id: 1, x: 0.0, y: 0.0, mass: 1.0 }, { id: 2, x: 1.0, y: 0.0, mass: 2.0 }, { id: 3, x: 2.0, y: 0.0, mass: 3.0 }, } | kernel k |> std/kernel:pairwise { k.mass += k.other.mass } | kernel s |> std/io:print.blk { mass[0]={{s[0].mass}} mass[1]={{s[1].mass}} mass[2]={{s[2].mass}} })

Test Configuration

MUST_RUN