Class LwjglProgram

All Implemented Interfaces:
OpenCLObject

public class LwjglProgram extends Program
  • Constructor Details

    • LwjglProgram

      public LwjglProgram(org.lwjgl.opencl.CLProgram program, LwjglContext context)
  • Method Details

    • getProgram

      public org.lwjgl.opencl.CLProgram getProgram()
    • build

      public void build(String args, Device... devices) throws KernelCompilationException
      Description copied from class: Program
      Builds this program with the specified argument string on the specified devices. Please see the official OpenCL specification for a definition of all supported arguments. The list of devices specify on which device the compiled program can then be executed. It must be a subset of Context.getDevices(). If null is passed, the program is built on all available devices.
      Specified by:
      build in class Program
      Parameters:
      args - the compilation arguments
      devices - a list of devices on which the program is build.
      Throws:
      KernelCompilationException - if the compilation fails
      See Also:
    • createKernel

      public Kernel createKernel(String name)
      Description copied from class: Program
      Creates the kernel with the specified name.
      Specified by:
      createKernel in class Program
      Parameters:
      name - the name of the kernel as defined in the source code
      Returns:
      the kernel object
    • createAllKernels

      public Kernel[] createAllKernels()
      Description copied from class: Program
      Creates all available kernels in this program. The names of the kernels can then be queried by Kernel.getName().
      Specified by:
      createAllKernels in class Program
      Returns:
      an array of all kernels
    • getBinary

      public ByteBuffer getBinary(Device device)
      Description copied from class: Program
      Queries a compiled binary representation of this program for a particular device. This binary can then be used e.g. in the next application launch to create the program from the binaries and not from the sources. This saves time.
      Specified by:
      getBinary in class Program
      Parameters:
      device - the device from which the binaries are taken
      Returns:
      the binaries
      See Also: