Class CLProgramsManager

java.lang.Object
cz.fidentis.analyst.opencl.impl.CLProgramsManager

public class CLProgramsManager extends Object
This object deals with programs of a single OpenCL context. The compilation of programs is lazy (only after the first request).
  • Constructor Details

    • CLProgramsManager

      public CLProgramsManager(com.jogamp.opencl.CLContext clContext)
      Constructor.
      Parameters:
      clContext - OpenCL context. Must not be null.
  • Method Details

    • getOrCompile

      public CompiledCLProgram getOrCompile(CLProgramDef programSpec, Map<com.jogamp.opencl.CLDevice,byte[]> binaries) throws com.jogamp.opencl.CLException
      Lazy compilation and re-used of CL programs.
      Parameters:
      programSpec - Which CL program to compile/return
      Returns:
      The reference object to the compiled CL program
      Throws:
      com.jogamp.opencl.CLException - if the compilation fails
    • release

      public void release(CLProgramDef programDef)
      Removes the program and its shaders from this manager and from GPU memory.
      Parameters:
      programDef - Which CL program to release
    • releaseAll

      public void releaseAll()
      Removes all programs, asks for releasing GPU memory.
    • getClContext

      public com.jogamp.opencl.CLContext getClContext()
      Returns the OpenCL context
      Returns:
      the OpenCL context