Пример #1
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            OpenClSetting oclSetting = new OpenClSetting();
            oclSetting.ShowDialog(this);

            gpu = oclSetting.Gpu;
        }
Пример #2
0
        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();
        }
Пример #3
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            OpenClSetting oclSetting = new OpenClSetting();

            oclSetting.ShowDialog(this);

            gpu = oclSetting.Gpu;
        }
Пример #4
0
        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();
        }
Пример #5
0
 public GpuOverClock(IGpuHelper gpuHelper)
 {
     _gpuHelper = gpuHelper;
 }
Пример #6
0
        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();
        }
Пример #7
0
        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;
        }