Class 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 Detail

      • MAX_ARRAY_SIZE

        public static int MAX_ARRAY_SIZE
    • 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()