Builtin Library
README.md
field.walk_state
The state of the walker a walk step is written for: count floats from lane first. The step is a Field over this leaf, field.walk_index and the walker's element number; fieldc.walkSpec writes it as the functions the walk kernel calls. A state of up to 8 floats is read as one leaf in lanes 0 to 3 and one in lanes 4 to 7. Read where no walk step is written, the field refuses to compile and says so.
Inputs
count(Float). Default3. 1 to 4. How many floats of the state this reads, 1 to 4.first(Float). Default0. 0 to 7. The first lane read, 0 to 7. Lanes 0 to 3 and lanes 4 to 7 are read by separate leaves, so a leaf stays inside one of them.
Outputs
field: a field ofcountfloats.
Example
local state = g.field.walk_state({ count = 2 })
local k = g.field.walk_index()
local step = state + k * 0.5
step is the walk step of a two-float state; fieldc.walkSpec(step, { width = 2, count = 2 }) writes it as the WALK_STEP and WALK_PRELUDE the walk kernel is specialized with.