Beispiel #1
0
        public List <Algorithm> GetAlgorithmSettings()
        {
            // hello state
            var algos = GetAlgorithmSettingsThirdParty(ConfigManager.GeneralConfig.Use3rdPartyMiners);

            var retAlgos = MinerPaths.GetAndInitAlgorithmsMinerPaths(algos, this);;

            // additional filters
            // CPU
            if (this.DeviceType == DeviceType.CPU && MinersManager.EquihashCPU_USE_eqm())
            {
                retAlgos = retAlgos.FindAll((a) => a.MinerBaseType != MinerBaseType.nheqminer);
            }
            else if (this.DeviceType == DeviceType.CPU)
            {
                retAlgos = retAlgos.FindAll((a) => a.MinerBaseType != MinerBaseType.eqm);
            }
            // NVIDIA
            if (this.DeviceGroupType == DeviceGroupType.NVIDIA_5_x || this.DeviceGroupType == DeviceGroupType.NVIDIA_6_x)
            {
                retAlgos = retAlgos.FindAll((a) => a.MinerBaseType != MinerBaseType.nheqminer);
            }
            else if (this.DeviceType == DeviceType.NVIDIA)
            {
                retAlgos = retAlgos.FindAll((a) => a.MinerBaseType != MinerBaseType.eqm);
            }

            // sort by miner and algo
            retAlgos.Sort((a_1, a_2) => (a_1.MinerBaseType - a_2.MinerBaseType) != 0 ? (a_1.MinerBaseType - a_2.MinerBaseType) : (a_1.NiceHashID - a_2.NiceHashID));

            return(retAlgos);
        }
Beispiel #2
0
        public static string GetOptimizedMinerPath(AlgorithmType algorithmType, DeviceType deviceType, DeviceGroupType deviceGroupType, string devCodename, bool isOptimized)
        {
            // special cases
            // AlgorithmType.DaggerHashimoto special shared case
            if (algorithmType == AlgorithmType.DaggerHashimoto &&
                (deviceType == DeviceType.AMD || deviceType == DeviceType.NVIDIA))
            {
                return(MinerPaths.ethminer);
            }
            // AlgorithmType.Equihash special shared case
            if (algorithmType == AlgorithmType.Equihash)
            {
                if (deviceGroupType == DeviceGroupType.NVIDIA_5_x || deviceGroupType == DeviceGroupType.NVIDIA_6_x ||
                    (MinersManager.EquihashCPU_USE_eqm() && DeviceGroupType.CPU == deviceGroupType))
                {
                    return(MinerPaths.eqm);
                }
                else if (deviceType == DeviceType.AMD && ConfigManager.GeneralConfig.Use3rdPartyMiners == Use3rdPartyMiners.YES)    // TODO remove state
                {
                    return(MinerPaths.ClaymoreZcashMiner);
                }
                else   // supports all DeviceTypes
                {
                    return(MinerPaths.nheqminer);
                }
            }
            // normal stuff
            // CPU
            if (deviceType == DeviceType.CPU)
            {
                return(CPU_GROUP.cpu_miner_opt(CPUUtils.GetMostOptimized()));
            }
            // NVIDIA
            if (deviceType == DeviceType.NVIDIA)
            {
                var nvidiaGroup = deviceGroupType;
                // sm21 and sm3x have same settings
                if (nvidiaGroup == DeviceGroupType.NVIDIA_2_1 || nvidiaGroup == DeviceGroupType.NVIDIA_3_x)
                {
                    return(NVIDIA_GROUPS.ccminer_sm21_or_sm3x(algorithmType));
                }
                // sm5x and sm6x have same settings
                if (nvidiaGroup == DeviceGroupType.NVIDIA_5_x || nvidiaGroup == DeviceGroupType.NVIDIA_6_x)
                {
                    return(NVIDIA_GROUPS.ccminer_sm5x_or_sm6x(algorithmType));
                }
            }
            // AMD
            if (deviceType == DeviceType.AMD)
            {
                return(AMD_GROUP.sgminer_path(algorithmType, devCodename, isOptimized));
            }

            return(NONE);
        }
 private static bool IsCPU_eqm(MiningPair a)
 {
     return(MinersManager.EquihashCPU_USE_eqm() && a.Device.DeviceType == DeviceType.CPU);
 }