Builtin Library
- ..
- README.md1.9 KB
- bindings.yaml2.3 KB
- shader.wgsl4.7 KB
README.md
concat
Joins one attribute of several geometries into one column. sources is a column
table with one column per geometry, in order, from column first; desc says,
from word base, where each geometry's elements start in the result, how many it
has, how far to shift each value of a linkage column, and whether the geometry
holds the attribute at all. Where it does not, its elements take the default
stated in the first four words of the description, their own place in their
geometry (absent 1), or -1 (absent 2). The joined column is dst, n * lanes
words.
The params are lanes (the words an element holds), parts (how many geometries
are joined), first and base (where this attribute's columns and description
begin), kind, absent, moved and scale.
Linkage is a shift: vertex.pt takes the number of points before the geometry,
primitive.vstart the number of vertices before it, and point.id the amount
that keeps the ids unique across the geometries. Any other attribute shifts by
0. scale multiplies every value before the shift moves it. With moved 1 a
negative value stays and only the others move: a column of point ids where -1
names no point.
kind states the word form of the joined column (0 f32, 1 i32, 2 u32): each
geometry's column is read as the value it holds, by the form its table entry
states, and written as that value in the joined form, so a column one geometry
holds as Int and another as Float joins by value. The default, 3, moves the words
as they stand.
A join of a whole geometry runs the kernel once per attribute of the union of the
geometries' attributes, with one description run for all of them
(geometry.join, and proc.substrate.Geometry.merge for geometries that count
their elements on the device, whose descriptions the device writes from the
counts).
Dispatch over n, the elements of the joined domain. Exact: each result
element has one writer.