Package cz.fidentis.analyst.opencl.impl
Class CompiledCLProgram
java.lang.Object
cz.fidentis.analyst.opencl.impl.CompiledCLProgram
- All Implemented Interfaces:
CLProgram
A proxy object storing the information about a CL program compiled on GPU.
-
Constructor Summary
ConstructorsConstructorDescriptionCompiledCLProgram
(com.jogamp.opencl.CLContext clContext, CLProgramDef programDef) Links OpenCL source files into single file, then compiles with provided compiler options -
Method Summary
Modifier and TypeMethodDescriptioncompile()
Compiles the program on GPU.Compiles the program on GPU.boolean
Map
<com.jogamp.opencl.CLDevice, byte[]> Gets compiled binaries of CLProgram.com.jogamp.opencl.CLKernel
Gets kernel from CLProgramint
hashCode()
void
release()
Ask GPU to release the program from its memory.
-
Constructor Details
-
CompiledCLProgram
Links OpenCL source files into single file, then compiles with provided compiler options- Parameters:
clContext
- OpenCL context. Must not benull
.programDef
- The definition of the program to be compiled
-
-
Method Details
-
compile
Compiles the program on GPU.- Returns:
- this object
- Throws:
com.jogamp.opencl.CLException
- if the compilation fails
-
compile
public CompiledCLProgram compile(Map<com.jogamp.opencl.CLDevice, byte[]> binaries) throws com.jogamp.opencl.CLExceptionCompiles the program on GPU.- Parameters:
binaries
- Uses already compiled binaries as source- Returns:
- this object
- Throws:
com.jogamp.opencl.CLException
- if the compilation fails
-
release
public void release()Ask GPU to release the program from its memory. -
equals
-
hashCode
public int hashCode() -
getKernel
Description copied from interface:CLProgram
Gets kernel from CLProgram -
getBinaries
Description copied from interface:CLProgram
Gets compiled binaries of CLProgram. It is faster to recompile binary for new context than to compile the program from scratch.- Specified by:
getBinaries
in interfaceCLProgram
- Returns:
- compiled binaries
-