Package cz.fidentis.analyst.opencl.impl
Class SingletonGpuManagerCL
java.lang.Object
cz.fidentis.analyst.opencl.impl.SingletonGpuManagerCL
A singleton object managing with OpenCL contexts and their CL programs.
Stores binaries to allow for faster compilation of already compiled programs for new contexts
-
Method Summary
Modifier and TypeMethodDescriptionstatic SingletonGpuManagerCL
Returns the single instancegetOrCompile
(com.jogamp.opencl.CLContext clContext, CLProgramDef program) Compiles the CL program, re-uses already compiled programs or re-compiles program binaries for desired context.void
release
(com.jogamp.opencl.CLContext clContext) Should be called before the OpenCL context is erased.
-
Method Details
-
getOrCompile
Compiles the CL program, re-uses already compiled programs or re-compiles program binaries for desired context.- Parameters:
clContext
- OpenCL context. Must not benull
.program
- CL program- Returns:
- The reference object to the compiled CL program
-
release
public void release(com.jogamp.opencl.CLContext clContext) Should be called before the OpenCL context is erased.- Parameters:
clContext
- OpenCL context. Must not benull
.
-
getInstance
Returns the single instance- Returns:
- the single instance
-