internal IComputeKernel CreateKernel(CLKernelHandle handle)
        {
            var kernel = new ComputeKernel120();

            kernel.Handle = handle;
            kernel.SetID(kernel.Handle.Value);

            kernel.FunctionName = kernel.GetStringInfo(kernel.Handle, ComputeKernelInfo.FunctionName, OpenCL120.GetKernelInfoWrapper);
            logger.Info("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
            return(kernel);
        }
        /// <summary>
        /// Creates a kernel for a kernel function of a specified name.
        /// </summary>
        /// <returns> The created kernel. </returns>
        public IComputeKernel CreateKernel(IComputeProgram program, string functionName)
        {
            var kernel = new ComputeKernel120();

            kernel.Handle = OpenCL120.CreateKernel(
                program.Handle,
                functionName,
                out ComputeErrorCode error);
            ComputeException.ThrowOnError(error);

            kernel.SetID(kernel.Handle.Value);
            kernel.FunctionName = functionName;
            logger.Info("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
            return(kernel);
        }