ComputeKernel class final

One compute kernel, read from kernel language source and checked.

Throws ComputeKernelException, with the line and column, for source that is not one.

Properties

bindings → List<KernelBinding>
What it binds, in order.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
languageVersion → int
The kernel language version the source is written in: its kernel <N> line, or kernelLanguageFirstVersion without one.
no setter
name → String
The name a bundle and a step know it by.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → String
The whole source it was read from: what a bundle's kernel section carries, so every device reads the kernel from the text itself.
final
workgroupSize → WorkgroupSize
workgroup x, y, z, one where the source gave fewer.
no setter

Methods

binding(String name) → KernelBinding?
The binding called name, or null.
groupsFor(int invocations) → int
How many workgroups along x cover invocations invocations.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDartKernel() → DartKernel
This kernel as Dart.
toString() → String
A string representation of this object.
override
toWgsl() → WgslKernel
This kernel as one WGSL module.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

parse(String source, {String? name}) → ComputeKernel
The kernel called name in source, or its only kernel when name is null. Throws ComputeKernelException when there is no such kernel, or more than one and no name.
parseAll(String source) → List<ComputeKernel>
Every compute block of source, in order; a material or fullscreen block beside them is skipped, and any other top-level word refused.