public void SetKernel(string OpenCLBody, string EntryPoint) { this.OpenCLBody = OpenCLBody; this.EntryPoint = EntryPoint; ComputeProgram program = new ComputeProgram(context, OpenCLBody); try { program.Build(null, null, null, IntPtr.Zero); kernel = program.CreateKernel(EntryPoint); } catch (BuildProgramFailureComputeException) { string message = program.GetBuildLog(Accelerator.Device); throw new ArgumentException(message); } catch (ComputeException) { string message = program.GetBuildLog(Accelerator.Device); throw new ArgumentException(message); } MethodInfo = new CLMethod(EntryPoint, OpenCLBody); MethodSet = true; }
public void SetEntryPoint(string EntryPoint) { this.EntryPoint = EntryPoint; MethodInfo = new CLMethod(EntryPoint, OpenCLBody); MethodSet = true; }