private void btnCompileToFile_Click(object sender, EventArgs e) { ofdCompile.DefaultExt = "gpf"; ofdCompile.Filter = "GPF Program File (*.gpf) |*.gpf"; if (ofdCompile.ShowDialog() == DialogResult.OK) { string filename = ofdCompile.FileName; var program = GpfCompiler.CompileProgram(filename); program.ToFile(filename + "_c"); MessageBox.Show("Compilation Successful"); } }
public void CreateFilter(string programFile, string outputFolder, int gpuIndex, int memSize, int streams) { Filtering = true; FilterProgram = GpfCompiler.CompileProgram(programFile); GpfOutputFolder = outputFolder; GpuIndex = gpuIndex; GpuBufferSize = memSize; GpuStreams = streams; if (!Directory.Exists(outputFolder)) { Directory.CreateDirectory(outputFolder); } }