Beispiel #1
0
 /// <summary>
 /// Runs a kernel with a valid FL kernel signature
 /// </summary>
 /// <param name="instance">CLAPI Instance for the current thread</param>
 /// <param name="kernel">The CLKernel to be executed</param>
 /// <param name="image">The image buffer that serves as input</param>
 /// <param name="dimensions">The dimensions of the input buffer</param>
 /// <param name="genTypeMaxVal">The max valuee of the generic type that is used.(byte = 255)</param>
 /// <param name="enabledChannels">The enabled channels for the kernel</param>
 /// <param name="channelCount">The amount of active channels.</param>
 public static void Run(CLAPI instance, CLKernel kernel, MemoryBuffer image, int3 dimensions,
                        float genTypeMaxVal,
                        MemoryBuffer enabledChannels,
                        int channelCount)
 {
     kernel.Run(instance.commandQueue, image, dimensions, genTypeMaxVal, enabledChannels, channelCount);
 }
Beispiel #2
0
        /// <summary>
        /// Tries to get the CLKernel by the specified name
        /// </summary>
        /// <param name="name">The name of the kernel</param>
        /// <param name="kernel">The kernel. Null if not found</param>
        /// <returns>Returns True if the kernel has been found</returns>
        public bool TryGetClKernel(string name, out CLKernel kernel)
        {
            if (LoadedKernels.ContainsKey(name))
            {
                kernel = LoadedKernels[name];
                return(true);
            }

            kernel = null;
            return(false);
        }
Beispiel #3
0
 public static void Run(CLAPI instance, CLKernel kernel, int groupSize)
 {
     kernel.Run(instance.commandQueue, 1, groupSize);
 }