コード例 #1
0
ファイル: MainForm.cs プロジェクト: Ninputer/opencl-plot
        private void MainForm_Shown(object sender, EventArgs e)
        {
            OpenClSetting oclSetting = new OpenClSetting();
            oclSetting.ShowDialog(this);

            gpu = oclSetting.Gpu;
        }
コード例 #2
0
ファイル: OpenClSetting.cs プロジェクト: zhang8153119/Nest
        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
ファイル: MainForm.cs プロジェクト: oysteinkrog/opencl-plot
        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
ファイル: GpuOverClock.cs プロジェクト: yuanaichi/ntminer
 public GpuOverClock(IGpuHelper gpuHelper)
 {
     _gpuHelper = gpuHelper;
 }
コード例 #6
0
ファイル: OpenClSetting.cs プロジェクト: Ninputer/opencl-plot
        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
ファイル: OpenClSetting.cs プロジェクト: Ninputer/opencl-plot
        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;
        }