|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.engine.opencl.kernels.EncogKernel
public class EncogKernel
Defines a basic OpenCL kernal, as used by Encog. Contains the kernal source code and a compiled program/kernal.
| Constructor Summary | |
|---|---|
EncogKernel(EncogCLDevice device,
String sourceName,
String kernelName)
Create an Encog OpenCL kernel. |
|
| Method Summary | |
|---|---|
void |
compile()
Compile the kernel with no preprocessor defines. |
void |
compile(Map<String,String> options)
Compile the kernel with a map of preprocessor defines, a collection of name-value pairs. |
org.jocl.cl_mem |
createArrayReadOnly(float[] array)
Create an array buffer that is read only for floats. |
org.jocl.cl_mem |
createArrayReadOnly(int[] array)
Create an array buffer that is read only for ints. |
org.jocl.cl_mem |
createFloatArrayWriteOnly(int length)
Create an array buffer that is write only. |
String |
getCLSource()
|
org.jocl.cl_context |
getContext()
|
EncogCLDevice |
getDevice()
|
int |
getGlobalWork()
|
org.jocl.cl_kernel |
getKernel()
|
int |
getLocalWork()
|
int |
getMaxWorkGroupSize()
|
org.jocl.cl_program |
getProgram()
|
String |
getSourceName()
|
long |
getWorkGroupLong(int param)
Get a long param from the device. |
void |
prepareKernel()
Called internally to prepare to execute a kernel. |
void |
release()
Release this kernel. |
void |
releaseBuffer(org.jocl.cl_mem mem)
Release a buffer. |
void |
setArg(int num,
org.jocl.cl_mem mem)
Set an argument. |
void |
setCLSource(String cl)
|
void |
setGlobalWork(int globalWork)
Set the size of the global work group. |
void |
setLocalWork(int localWork)
Set the size of the local work group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncogKernel(EncogCLDevice device,
String sourceName,
String kernelName)
device - The OpenCL device to use.sourceName - The name of the kernel, from an embedded resource.kernelName - The name of the function, in the kernel, called to start the
kernel.| Method Detail |
|---|
public void compile()
public void compile(Map<String,String> options)
options - A map of preprocessor defines.public org.jocl.cl_mem createArrayReadOnly(float[] array)
array - The array to base on.
public org.jocl.cl_mem createArrayReadOnly(int[] array)
array - The array to base on.
public org.jocl.cl_mem createFloatArrayWriteOnly(int length)
length - The length of the buffer.
public String getCLSource()
public org.jocl.cl_context getContext()
public EncogCLDevice getDevice()
public int getGlobalWork()
public org.jocl.cl_kernel getKernel()
public int getLocalWork()
public int getMaxWorkGroupSize()
public org.jocl.cl_program getProgram()
public String getSourceName()
public long getWorkGroupLong(int param)
param - The param desired.
public void prepareKernel()
public void release()
public void releaseBuffer(org.jocl.cl_mem mem)
mem - The buffer to release.
public void setArg(int num,
org.jocl.cl_mem mem)
num - The argument number.mem - The memory buffer.public void setCLSource(String cl)
cl - the cl to setpublic void setGlobalWork(int globalWork)
globalWork - The size of the global work group.public void setLocalWork(int localWork)
localWork - The size of the local work group.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||