Class KernelSource

java.lang.Object
civitas.celestis.gpu.KernelSource

public class KernelSource extends Object
A source object which can be used as a parameter of GPU.createKernel(KernelSource). Predefined kernels are packaged in the form of kernel source objects. Source objects are immutable, and can be safely shared across multiple threads.
  • Field Details

    • source

      @Nonnull protected final String source
      The source code of this kernel.
    • name

      @Nonnull protected final String name
      The name of this kernel.
    • paramCount

      protected final int paramCount
      The parameter count of this kernel.
  • Constructor Details

    • KernelSource

      public KernelSource(@Nonnull String source, @Nonnull String name, int paramCount)
      Creates a new kernel source.
      Parameters:
      source - The source code to use
      name - The qualified method name of the kernel
      paramCount - The parameter count of the kernel
    • KernelSource

      protected KernelSource(@Nonnull KernelSource ks)
      Creates a new kernel source.
      Parameters:
      ks - The source object of which to copy values from