Length of all samples in bytes.
Size of a sample's component in bytes.
Number of components per sample, e.g., 2 for 2-tuple samples, 3 for 3-tuple samples, etc.
The depth of the kernel (z-axis)
Returns the number of samples.
The height of the kernel (y-axis)
Returns the number of samples, i.e., the number of elements times the number of components per element.
All elements/samples of the kernel as array buffer.
The width of the kernel (x-axis)
Distance between the indices of two adjacent elements along the x-axis in bytes.
Distance between the indices of two adjacent elements along the y-axis in bytes.
Distance between the indices of two adjacent elements along the z-axis in bytes.
Inheritor is expected to implement this in order to copy and type-convert a flat array.
Array of all sample components in a flat sequence.
Fully reconfigures, i.e., resizes and copies samples, the kernel.
JSON object either from file, or set manually. These kernels can be generated using, e.g., glkernel https://github.com/cginternals/glkernel.
Returns the n-tuple/n-component element at index within the cached kernel.
If x is greater than width, this is interpreted as overall kernel index (requires y and z positions to be undefined). Position is clamped to the range [0, width - 1].
Position along the y-axis to access the kernel element at (clamped to range [0, height - 1]).
Position along the z-axis to access the kernel element at (clamped to range [0, depth - 1]).
Returns the index of an element at a specific position.
Position along the x-axis (clamped to range [0, width - 1]).
Position along the y-axis (clamped to range [0, height - 1]).
Position along the z-axis (clamped to range [0, depth - 1]).
Returns the position of an element at a specific index.
Index of the requested position (clamped to range [0, size]).
Should resize the samples array w.r.t. to the typed array buffer. The resulting array buffer may be empty.
Sets the n-tuple/n-component sample at index within the cached kernel.
Values to be set at specified index or position.
If x is greater than width, this is interpreted as overall kernel index (requires y and z positions to be undefined). Position is clamped to the range [0, width - 1].
Position along the y-axis to access the kernel element at (clamped to range [0, height - 1]).
Position along the z-axis to access the kernel element at (clamped to range [0, depth - 1]).
Sorts all samples based on the given sorting approach, e.g., by length of a sample. In order to sort an array of samples comprising a number of components an sort-auxiliary array is created, sorted, and, finally, mapped to the sample array.
Sorting approach that is to be used.
Kernel class is based on the idea of glkernel https://github.com/cginternals/glkernel and is the basis for various auxiliary kernels that are mainly intended for but not limited to GPU use. A kernel stores samples in a three-dimensional structure. Each sample can have up to four components (vec4) and is strongly typed, e.g., KernelF32. The samples can be accessed and modified in various ways and easily passed to the GPU.