コード例 #1
0
ファイル: eqm.cs プロジェクト: almoharebhamad/NiceHashMiner
        protected override string GetDevicesCommandString()
        {
            string deviceStringCommand = " ";

            if (CPU_Setup.IsInit)
            {
                deviceStringCommand += "-p " + CPU_Setup.MiningPairs.Count;
                deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(CPU_Setup, DeviceType.CPU);
            }
            else
            {
                // disable CPU
                deviceStringCommand += " -t 0 ";
            }

            if (NVIDIA_Setup.IsInit)
            {
                deviceStringCommand += " -cd ";
                foreach (var nvidia_pair in NVIDIA_Setup.MiningPairs)
                {
                    for (int i = 0; i < ExtraLaunchParametersParser.GetEqmCudaThreadCount(nvidia_pair); ++i)
                    {
                        deviceStringCommand += nvidia_pair.Device.ID + " ";
                    }
                }
                // no extra launch params
                deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(NVIDIA_Setup, DeviceType.NVIDIA);
            }

            return(deviceStringCommand);
        }
コード例 #2
0
        protected override string GetDevicesCommandString()
        {
            Path             = this.MiningSetup.MinerPath;
            WorkingDirectory = this.MiningSetup.MinerPath.Replace("eqm.exe", "");

            string deviceStringCommand = " ";

            if (CPU_Setup.IsInit)
            {
                deviceStringCommand += "-p " + CPU_Setup.MiningPairs.Count;
                deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(CPU_Setup, DeviceType.CPU);
            }
            else
            {
                // disable CPU
                deviceStringCommand += " -t 0 ";
            }

            if (NVIDIA_Setup.IsInit)
            {
                deviceStringCommand += " -cd ";
                foreach (var nvidia_pair in NVIDIA_Setup.MiningPairs)
                {
                    if (nvidia_pair.CurrentExtraLaunchParameters.Contains("-ct"))
                    {
                        for (int i = 0; i < ExtraLaunchParametersParser.GetEqmCudaThreadCount(nvidia_pair); ++i)
                        {
                            deviceStringCommand += nvidia_pair.Device.ID + " ";
                        }
                    }
                    else     // use default 2 best performance
                    {
                        for (int i = 0; i < 2; ++i)
                        {
                            deviceStringCommand += nvidia_pair.Device.ID + " ";
                        }
                    }
                }
                // no extra launch params
                deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(NVIDIA_Setup, DeviceType.NVIDIA);
            }

            return(deviceStringCommand);
        }
コード例 #3
0
        protected override string GetDevicesCommandString()
        {
            var ctMiningPairs       = new List <MiningPair>();
            var deviceStringCommand = " -cd ";
            var defaultCT           = 1;

            if (MiningSetup.CurrentAlgorithmType == AlgorithmType.Equihash)
            {
                defaultCT = 2;
            }
            foreach (var nvidiaPair in MiningSetup.MiningPairs)
            {
                if (nvidiaPair.CurrentExtraLaunchParameters.Contains("-ct"))
                {
                    for (var i = 0; i < ExtraLaunchParametersParser.GetEqmCudaThreadCount(nvidiaPair); ++i)
                    {
                        deviceStringCommand += nvidiaPair.Device.ID + " ";
                        ctMiningPairs.Add(nvidiaPair);
                    }
                }
                else
                {
                    // use default default_CT for best performance
                    for (var i = 0; i < defaultCT; ++i)
                    {
                        deviceStringCommand += nvidiaPair.Device.ID + " ";
                        ctMiningPairs.Add(nvidiaPair);
                    }
                }
            }

            var ctMiningSetup = new MiningSetup(ctMiningPairs);

            //deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(this.MiningSetup, DeviceType.NVIDIA);
            deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(ctMiningSetup, DeviceType.NVIDIA);

            return(deviceStringCommand);
        }
コード例 #4
0
ファイル: excavator.cs プロジェクト: Nayjin/NiceHashMiner
        protected override string GetDevicesCommandString()
        {
            string deviceStringCommand = " -cd ";

            if (this.MiningSetup.CurrentAlgorithmType == AlgorithmType.Equihash)
            {
                foreach (var nvidia_pair in this.MiningSetup.MiningPairs)
                {
                    if (nvidia_pair.CurrentExtraLaunchParameters.Contains("-ct"))
                    {
                        for (int i = 0; i < ExtraLaunchParametersParser.GetEqmCudaThreadCount(nvidia_pair); ++i)
                        {
                            deviceStringCommand += nvidia_pair.Device.ID + " ";
                        }
                    }
                    else     // use default 2 best performance
                    {
                        for (int i = 0; i < 2; ++i)
                        {
                            deviceStringCommand += nvidia_pair.Device.ID + " ";
                        }
                    }
                }
            }
            else
            {
                foreach (var nvidia_pair in this.MiningSetup.MiningPairs)
                {
                    deviceStringCommand += nvidia_pair.Device.ID + " ";
                }
            }

            // no extra launch params
            deviceStringCommand += " " + ExtraLaunchParametersParser.ParseForMiningSetup(this.MiningSetup, DeviceType.NVIDIA);

            return(deviceStringCommand);
        }