Skip to content
View source

Field builtinsGenerated

The builtins of kind field, as the compiler’s own table lists them.

Returns Function Requires
T at (field: Rows<T>, index: Int) +4 field.read
T at_linear (field: Rows<T>, position: Float) +2 field.read
Int count (field: Rows<T>) +2 field.read
T fetch (field: Rows<T>, index: Int) +4 field.read
Int isize (field: Rows<T>) +2 field.read
T sample (field: Rows<T>) +2 field.read
Vec2 size (field: Grid<T>) +1 field.read
at(field: Rows<T>, index: Int) -> T
at(field: Grid<T>, at: Vec2) -> T
at(field: Grid<T>, at: IVec2) -> T
at(field: Volume<T>, at: Vec3) -> T
at(field: Volume<T>, at: IVec3) -> T

The element at an address: the index, or the coordinates floored, clamped into the Field (NaN as zero). A memory reads as the steps have left it, and as it was bound in a scan’s initial value.

Requires: field.read


at_linear(field: Rows<T>, position: Float) -> T
at_linear(field: Grid<T>, position: Vec2) -> T
at_linear(field: Volume<T>, position: Vec3) -> T

The neighboring elements blended by the fractional position (element centers at.5), T of floats only; clamped at the edges.

Requires: field.read


count(field: Rows<T>) -> Int
count(field: Grid<T>) -> Int
count(field: Volume<T>) -> Int

How many elements the Field has.

Requires: field.read


fetch(field: Rows<T>, index: Int) -> T
fetch(field: Grid<T>, at: Vec2) -> T
fetch(field: Grid<T>, at: IVec2) -> T
fetch(field: Volume<T>, at: Vec3) -> T
fetch(field: Volume<T>, at: IVec3) -> T

Another name for at.

Requires: field.read


isize(field: Rows<T>) -> Int
isize(field: Grid<T>) -> IVec2
isize(field: Volume<T>) -> IVec3

The Field’s extent along each axis, as integers.

Requires: field.read


sample(field: Rows<T>) -> T
sample(field: Grid<T>) -> T
sample(field: Volume<T>) -> T

The input’s element at this element’s own coordinates, clamped into the input.

Requires: field.read · Callable from a Kernel body only


size(field: Grid<T>) -> Vec2
size(field: Volume<T>) -> Vec3

The Field’s extent along each axis.

Requires: field.read