Package net.haesleinhuepf.clij.utilities
Class CLKernelExecutor
- java.lang.Object
-
- net.haesleinhuepf.clij.utilities.CLKernelExecutor
-
public class CLKernelExecutor extends Object
This executor can call OpenCL files. It uses some functionality adapted from FastFuse, to make .cl file handling easier. For example, it ensures that the right image_read/image_write methods are called depending on the image type.Author: Robert Haase (http://haesleinhuepf.net) at MPI CBG (http://mpi-cbg.de) February 2018
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_ARRAY_SIZE
-
Constructor Summary
Constructors Constructor Description CLKernelExecutor(net.haesleinhuepf.clij.clearcl.ClearCLContext context, Class anchorClass, String programFilename, String kernelName, long[] globalSizes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanenqueue(boolean waitToFinish)protected net.haesleinhuepf.clij.clearcl.ClearCLKernelgetKernel(net.haesleinhuepf.clij.clearcl.ClearCLContext context, String kernelName)protected net.haesleinhuepf.clij.clearcl.ClearCLKernelgetKernel(net.haesleinhuepf.clij.clearcl.ClearCLContext context, String kernelName, Map<String,Object> defines)static voidgetOpenCLDefines(Map<String,Object> defines, net.haesleinhuepf.clij.clearcl.enums.ImageChannelDataType imageChannelDataType, boolean isInputImage)static voidgetOpenCLDefines(Map<String,Object> defines, net.haesleinhuepf.clij.coremem.enums.NativeTypeEnum nativeTypeEnum, boolean isInputImage)protected StringgetProgramSource()voidsetAnchorClass(Class anchorClass)voidsetGlobalSizes(long[] globalSizes)voidsetKernelName(String kernelName)voidsetParameterMap(Map<String,Object> parameterMap)Map of all parameters.voidsetProgramFilename(String programFilename)
-
-
-
Constructor Detail
-
CLKernelExecutor
public CLKernelExecutor(net.haesleinhuepf.clij.clearcl.ClearCLContext context, Class anchorClass, String programFilename, String kernelName, long[] globalSizes) throws IOException- Throws:
IOException
-
-
Method Detail
-
getOpenCLDefines
public static void getOpenCLDefines(Map<String,Object> defines, net.haesleinhuepf.clij.clearcl.enums.ImageChannelDataType imageChannelDataType, boolean isInputImage)
-
getOpenCLDefines
public static void getOpenCLDefines(Map<String,Object> defines, net.haesleinhuepf.clij.coremem.enums.NativeTypeEnum nativeTypeEnum, boolean isInputImage)
-
setParameterMap
public void setParameterMap(Map<String,Object> parameterMap)
Map of all parameters. It is recommended that input and output images are given with the names "src" and "dst", respectively.- Parameters:
parameterMap- ?
-
enqueue
public boolean enqueue(boolean waitToFinish)
-
getProgramSource
protected String getProgramSource()
-
setAnchorClass
public void setAnchorClass(Class anchorClass)
-
setProgramFilename
public void setProgramFilename(String programFilename)
-
setKernelName
public void setKernelName(String kernelName)
-
setGlobalSizes
public void setGlobalSizes(long[] globalSizes)
-
getKernel
protected net.haesleinhuepf.clij.clearcl.ClearCLKernel getKernel(net.haesleinhuepf.clij.clearcl.ClearCLContext context, String kernelName) throws IOException- Throws:
IOException
-
getKernel
protected net.haesleinhuepf.clij.clearcl.ClearCLKernel getKernel(net.haesleinhuepf.clij.clearcl.ClearCLContext context, String kernelName, Map<String,Object> defines) throws IOException- Throws:
IOException
-
close
public void close()
-
-