private void MainForm_Shown(object sender, EventArgs e) { OpenClSetting oclSetting = new OpenClSetting(); oclSetting.ShowDialog(this); gpu = oclSetting.Gpu; }
private void okButton_Click(object sender, EventArgs e) { FPType fpType; if (fpTypeComboBox.SelectedItem as string == "Double Precision (AMD)") { fpType = FPType.FP64AMD; } else if (fpTypeComboBox.SelectedItem as string == "Double Precision") { fpType = FPType.FP64; } else { fpType = FPType.Single; } Gpu = GpuHelperFactory.CreateHelper(platformComboBox.SelectedItem as ComputePlatform, deviceComboBox.SelectedItem as ComputeDevice, fpType); IniHelper ih = new IniHelper(); ih.IniWriteValue("GPUConfig", "Platform", platformComboBox.Text.ToString()); ih.IniWriteValue("GPUConfig", "Device", deviceComboBox.Text.ToString()); ih.IniWriteValue("GPUConfig", "FpType", fpTypeComboBox.Text.ToString()); this.DialogResult = DialogResult.OK; Close(); }
private void MainForm_Shown(object sender, EventArgs e) { OpenClSetting oclSetting = new OpenClSetting(); oclSetting.ShowDialog(this); gpu = oclSetting.Gpu; }
private void okButton_Click(object sender, EventArgs e) { FPType fpType; if (fpTypeComboBox.SelectedItem as string == "Double Precision (AMD)") { fpType = FPType.FP64AMD; } else if (fpTypeComboBox.SelectedItem as string == "Double Precision") { fpType = FPType.FP64; } else { fpType = FPType.Single; } Gpu = GpuHelperFactory.CreateHelper(platformComboBox.SelectedItem as ComputePlatform, deviceComboBox.SelectedItem as ComputeDevice, fpType); Close(); }
public GpuOverClock(IGpuHelper gpuHelper) { _gpuHelper = gpuHelper; }
private void okButton_Click(object sender, EventArgs e) { FPType fpType; if (fpTypeComboBox.SelectedItem as string == "Double Precision (AMD)") { fpType = FPType.FP64AMD; } else if (fpTypeComboBox.SelectedItem as string == "Double Precision") { fpType = FPType.FP64; } else { fpType = FPType.Single; } Gpu = GpuHelperFactory.CreateHelper(platformComboBox.SelectedItem as ComputePlatform, deviceComboBox.SelectedItem as ComputeDevice, fpType); Close(); }
private void OpenClSetting_Load(object sender, EventArgs e) { Gpu = null; var platforms = ComputePlatform.Platforms; if (platforms.Count == 0) { platformComboBox.Enabled = false; deviceComboBox.Enabled = false; fpTypeComboBox.Enabled = false; okButton.Enabled = false; messageLabel.Text = "There's no OpenCL platform installed on this computer"; return; } platformComboBox.Items.AddRange(platforms.ToArray()); platformComboBox.SelectedIndex = 0; }