Esempio n. 1
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            bool canGroup = IsGroupableMinerBaseType(a) && IsGroupableMinerBaseType(b);

            // group if same bin path and same algo type
            if (canGroup && IsSameBinPath(a, b) && IsSameAlgorithmType(a, b) && IsNotCpuGroups(a, b) && IsSameDeviceType(a, b))
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            // group if same bin path and same algo type
            if (IsSameBinPath(a, b) && IsSameAlgorithmType(a, b) &&
                ((IsNotCpuGroups(a, b) && IsSameDeviceType(a, b)) ||
                 (a.Algorithm.MinerBaseType == MinerBaseType.Prospector &&
                  b.Algorithm.MinerBaseType == MinerBaseType.Prospector) ||
                 a.Algorithm.MinerBaseType == MinerBaseType.XmrStak || a.Algorithm.MinerBaseType == MinerBaseType.GMiner))
            {
                return(true);
            }

            return(false);
        }
Esempio n. 3
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            var canGroup = IsGroupableMinerBaseType(a) && IsGroupableMinerBaseType(b);

            // group if same bin path and same algo type
            if (canGroup && IsSameBinPath(a, b) && IsSameAlgorithmType(a, b) &&
                ((IsNotCpuGroups(a, b) && IsSameDeviceType(a, b)) ||
                 (a.Algorithm.MinerBaseType == MinerBaseType.Prospector &&
                  b.Algorithm.MinerBaseType == MinerBaseType.Prospector)))
            {
                return(true);
            }
            return(false);
        }
Esempio n. 4
0
 public static bool IsEquihashGroupLogic(string minerPath, MiningPair a, MiningPair b)
 {
     // eqm
     if (MinerPaths.eqm == minerPath) {
         return Is_eqm(a, b);
     }
         // nheqmnier
     else if (MinerPaths.nheqminer == minerPath) {
         return Is_nheqminer(a, b);
     } else if (MinerPaths.ClaymoreZcashMiner == minerPath) {
         return true;
     }
     return false;
 }
Esempio n. 5
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            if (a.Algorithm.MinerID != b.Algorithm.MinerID)
            {
                return(false);
            }
            var plugin = MinerPluginsManager.GetPluginWithUuid(a.Algorithm.MinerID);

            if (plugin == null)
            {
                return(false);
            }
            var canGroup = plugin.CanGroup(a, b);

            return(canGroup);
        }
        private static bool CheckPluginCanGroup(MiningPair a, MiningPair b)
        {
            var pluginA = (device : a.Device.PluginDevice, algorithm : ((PluginAlgorithm)a.Algorithm).BaseAlgo);
            var pluginB = (device : b.Device.PluginDevice, algorithm : ((PluginAlgorithm)b.Algorithm).BaseAlgo);

            if (pluginA.algorithm.MinerID != pluginB.algorithm.MinerID)
            {
                return(false);
            }

            var plugin = MinerPluginsManager.GetPluginWithUuid(pluginA.algorithm.MinerID);
            // TODO can plugin be null?
            var canGroup = plugin.CanGroup(pluginA, pluginB);

            return(canGroup);
        }
Esempio n. 7
0
 public static bool IsEquihashGroupLogic(MinerBaseType minerBase, MiningPair a, MiningPair b)
 {
     // eqm
     if (MinerBaseType.eqm == minerBase)
     {
         return(Is_eqm(a, b));
     }
     // nheqmnier
     else if (MinerBaseType.nheqminer == minerBase)
     {
         return(Is_nheqminer(a, b));
     }
     else if (MinerBaseType.ClaymoreAMD == minerBase || MinerBaseType.OptiminerAMD == minerBase)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 8
0
 public static bool IsEquihashGroupLogic(string minerPath, MiningPair a, MiningPair b)
 {
     // eqm
     if (MinerPaths.eqm == minerPath)
     {
         return(Is_eqm(a, b));
     }
     // nheqmnier
     else if (MinerPaths.nheqminer == minerPath)
     {
         return(Is_nheqminer(a, b));
     }
     else if (MinerPaths.ClaymoreZcashMiner == minerPath)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 9
0
 public static bool ShouldGroup(MiningPair a, MiningPair b)
 {
     // group if same bin path and same algo type
     if (IsSameBinPath(a, b) && IsSameAlgorithmType(a, b)) {
         AlgorithmType algorithmType = a.Algorithm.NiceHashID;
         // AlgorithmType.Equihash is special case
         if (AlgorithmType.Equihash == algorithmType) {
             string minerPath = MinerPaths.GetOptimizedMinerPath(a);
             return EquihashGroup.IsEquihashGroupLogic(minerPath,
                 a, b);
         }
             // all other algorithms are grouped if DeviceType is same and is not CPU
         else if (IsNotCpuGroups(a, b) && IsSameDeviceType(a, b)) {
             return true;
         }
     }
     return false;
 }
Esempio n. 10
0
 public static bool ShouldGroup(MiningPair a, MiningPair b)
 {
     // group if same bin path and same algo type
     if (IsSameBinPath(a, b) && IsSameAlgorithmType(a, b))
     {
         AlgorithmType algorithmType = a.Algorithm.NiceHashID;
         // AlgorithmType.Equihash is special case
         if (AlgorithmType.Equihash == algorithmType)
         {
             string minerPath = MinerPaths.GetOptimizedMinerPath(a);
             return(EquihashGroup.IsEquihashGroupLogic(minerPath,
                                                       a, b));
         }
         // all other algorithms are grouped if DeviceType is same and is not CPU
         else if (IsNotCpuGroups(a, b) && IsSameDeviceType(a, b))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 11
0
        public static bool ShouldGroup(MiningPair a, MiningPair b)
        {
            bool canGroup = IsGroupableMinerBaseType(a) && IsGroupableMinerBaseType(b);

            // group if same bin path and same algo type
            if (canGroup && IsSameBinPath(a, b) && IsSameAlgorithmType(a, b))
            {
                AlgorithmType algorithmType = a.Algorithm.NiceHashID;
                // AlgorithmType.Equihash is special case
                if (AlgorithmType.Equihash == algorithmType)
                {
                    return(EquihashGroup.IsEquihashGroupLogic(a.Algorithm.MinerBaseType,
                                                              a, b));
                }
                // all other algorithms are grouped if DeviceType is same and is not CPU
                else if (IsNotCpuGroups(a, b) && IsSameDeviceType(a, b))
                {
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 12
0
 private static bool IsNotCpuGroups(MiningPair a, MiningPair b)
 {
     return a.Device.DeviceType != DeviceType.CPU && b.Device.DeviceType != DeviceType.CPU;
 }
Esempio n. 13
0
 private static bool IsSameBinPath(MiningPair a, MiningPair b)
 {
     return MinerPaths.GetOptimizedMinerPath(a)
             == MinerPaths.GetOptimizedMinerPath(b);
 }
Esempio n. 14
0
 private static bool IsSameAlgorithmType(MiningPair a, MiningPair b)
 {
     return a.Algorithm.NiceHashID == b.Algorithm.NiceHashID;
 }
Esempio n. 15
0
 private static bool IsDevice_eqm(MiningPair a)
 {
     return(IsCPU_eqm(a) || IsNVIDIA_eqm(a));
 }
Esempio n. 16
0
            private static bool IsNVIDIA_eqm(MiningPair a)
            {
                var groupType = a.Device.DeviceGroupType;

                return(DeviceGroupType.NVIDIA_5_x == groupType || DeviceGroupType.NVIDIA_6_x == groupType);
            }
Esempio n. 17
0
 private static bool IsCPU_eqm(MiningPair a)
 {
     return MinersManager.EquihashCPU_USE_eqm() && a.Device.DeviceType == DeviceType.CPU;
 }
Esempio n. 18
0
 // group only first CPU split
 private static bool IsDevice_nheqminer(MiningPair a)
 {
     return(a.Device.DeviceType != DeviceType.CPU || // if not cpu then ignore case always good
            a.Device.ID == 0); // if CPU ID must be 0
 }
 // exception...
 public static int GetEqmCudaThreadCount(MiningPair pair)
 {
     if (pair.CurrentExtraLaunchParameters.Contains("-ct")) {
         List<MinerOption> eqm_CUDA_Options = new List<MinerOption>() {
             new MinerOption(MinerOptionType.CUDA_Solver_Thread, "-ct", "-ct", "1", MinerOptionFlagType.MultiParam, " "),
         };
         string parsedStr = Parse(new List<MiningPair>() { pair }, eqm_CUDA_Options, true);
         try {
             int threads = Int32.Parse(parsedStr.Trim().Replace("-ct", "").Trim());
             return threads;
         } catch { }
     }
     return 1; // default
 }
Esempio n. 20
0
 private static bool IsCPU_eqm(MiningPair a)
 {
     return(a.Device.DeviceType == DeviceType.CPU);
 }
Esempio n. 21
0
 private static bool IsDevice_eqm(MiningPair a)
 {
     return IsCPU_eqm(a) || IsNVIDIA_eqm(a);
 }
Esempio n. 22
0
 private static bool IsNVIDIA_eqm(MiningPair a)
 {
     var groupType = a.Device.DeviceGroupType;
     return DeviceGroupType.NVIDIA_5_x == groupType || DeviceGroupType.NVIDIA_6_x == groupType;
 }
Esempio n. 23
0
 // group only first CPU split
 private static bool IsDevice_nheqminer(MiningPair a)
 {
     return a.Device.DeviceType != DeviceType.CPU // if not cpu then ignore case always good
         || a.Device.ID == 0; // if CPU ID must be 0
 }
 public static string ParseForMiningPair(MiningPair miningPair, AlgorithmType algorithmType, DeviceType deviceType, bool showLog = true)
 {
     return ParseForMiningPairs(
         new List<MiningPair>() { miningPair },
         algorithmType, deviceType,
         MinerPaths.GetOptimizedMinerPath(miningPair), showLog);
 }
Esempio n. 25
0
 // TODO remove or don't recheck
 public void InitBenchmarkSetup(MiningPair benchmarkPair)
 {
     InitMiningSetup(new MiningSetup(new List<MiningPair>() { benchmarkPair }));
     BenchmarkAlgorithm = benchmarkPair.Algorithm;
 }
Esempio n. 26
0
 // nheqminer
 private static bool Is_nheqminer(MiningPair a, MiningPair b)
 {
     return(IsDevice_nheqminer(a) && IsDevice_nheqminer(b));
 }
Esempio n. 27
0
 private static bool IsSameBinPath(MiningPair a, MiningPair b)
 {
     return(MinerPaths.GetOptimizedMinerPath(a)
            == MinerPaths.GetOptimizedMinerPath(b));
 }
Esempio n. 28
0
 // eqm
 private static bool Is_eqm(MiningPair a, MiningPair b)
 {
     return(IsDevice_eqm(a) && IsDevice_eqm(b));
 }
 private static bool IsSameBinPath(MiningPair a, MiningPair b)
 {
     return(a.Algorithm.MinerBinaryPath == b.Algorithm.MinerBinaryPath);
 }
Esempio n. 30
0
 private static bool IsCPU_eqm(MiningPair a)
 {
     return(MinersManager.EquihashCPU_USE_eqm() && a.Device.DeviceType == DeviceType.CPU);
 }
 private static bool IsSameDeviceType(MiningPair a, MiningPair b)
 {
     return(a.Device.DeviceType == b.Device.DeviceType);
 }
Esempio n. 32
0
 // nheqminer
 private static bool Is_nheqminer(MiningPair a, MiningPair b)
 {
     return IsDevice_nheqminer(a) && IsDevice_nheqminer(b);
 }
Esempio n. 33
0
 private static bool IsSameDeviceType(MiningPair a, MiningPair b)
 {
     return a.Device.DeviceType == b.Device.DeviceType;
 }
 private static bool IsNotCpuGroups(MiningPair a, MiningPair b)
 {
     return(a.Device.DeviceType != DeviceType.CPU && b.Device.DeviceType != DeviceType.CPU);
 }
Esempio n. 35
0
 public static string GetOptimizedMinerPath(MiningPair pair)
 {
     return(GetOptimizedMinerPath(pair.Device, pair.Algorithm));
 }
 private static bool IsSameAlgorithmType(MiningPair a, MiningPair b)
 {
     return(a.Algorithm.DualNiceHashID == b.Algorithm.DualNiceHashID);
 }
 // PLUGIN stuff
 private static bool IsPluginAlgorithm(MiningPair a)
 {
     return(a.Algorithm.MinerBaseType == MinerBaseType.PLUGIN && a.Algorithm is PluginAlgorithm);
 }
 private static bool IsGroupableMinerBaseType(MiningPair a)
 {
     return(a.Algorithm.MinerBaseType != MinerBaseType.cpuminer);
 }
Esempio n. 39
0
 // eqm
 private static bool Is_eqm(MiningPair a, MiningPair b)
 {
     return IsDevice_eqm(a) && IsDevice_eqm(b);
 }