Ejemplo n.º 1
0
        public static bool EquihashCPU_USE_eqm()
        {
            var mostOptimized = CPUUtils.GetMostOptimized();

            return(mostOptimized == CPUExtensionType.AVX || mostOptimized == CPUExtensionType.AVX2 ||
                   mostOptimized == CPUExtensionType.AVX_AES || mostOptimized == CPUExtensionType.AVX2_AES);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// The GetPathFor
        /// </summary>
        /// <param name="computeDevice">The <see cref="ComputeDevice"/></param>
        /// <param name="algorithm">The <see cref="Algorithm"/></param>
        /// <returns>The <see cref="string"/></returns>
        public static string GetPathFor(ComputeDevice computeDevice, Algorithm algorithm /*, Options: MinerPathsConfig*/)
        {
            if (computeDevice == null || algorithm == null)
            {
                return(Data.NONE);
            }

            return(GetPathFor(
                       algorithm.MinerBaseType,
                       algorithm.CryptoMiner937ID,
                       computeDevice.DeviceGroupType,
                       CPUUtils.GetMostOptimized()
                       ));
        }
Ejemplo n.º 4
0
        public static string GetPathFor(ComputeDevice computeDevice, Algorithm algorithm /*, Options: MinerPathsConfig*/)
        {
            if (computeDevice == null || algorithm == null)
            {
                return(MinerPaths.NONE);
            }

            return(GetPathFor(
                       algorithm.MinerBaseType,
                       algorithm.NiceHashID,
                       computeDevice.DeviceGroupType,
                       computeDevice.Codename,
                       computeDevice.IsOptimizedVersion,
                       CPUUtils.GetMostOptimized()
                       ));
        }