예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
 }
예제 #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);
        }
예제 #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);
 }
예제 #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);
 }
예제 #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;
 }
예제 #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);
 }
예제 #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);
        }
예제 #12
0
 private static bool IsNotCpuGroups(MiningPair a, MiningPair b)
 {
     return a.Device.DeviceType != DeviceType.CPU && b.Device.DeviceType != DeviceType.CPU;
 }
예제 #13
0
 private static bool IsSameBinPath(MiningPair a, MiningPair b)
 {
     return MinerPaths.GetOptimizedMinerPath(a)
             == MinerPaths.GetOptimizedMinerPath(b);
 }
예제 #14
0
 private static bool IsSameAlgorithmType(MiningPair a, MiningPair b)
 {
     return a.Algorithm.NiceHashID == b.Algorithm.NiceHashID;
 }
예제 #15
0
 private static bool IsDevice_eqm(MiningPair a)
 {
     return(IsCPU_eqm(a) || IsNVIDIA_eqm(a));
 }
예제 #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);
            }
예제 #17
0
 private static bool IsCPU_eqm(MiningPair a)
 {
     return MinersManager.EquihashCPU_USE_eqm() && a.Device.DeviceType == DeviceType.CPU;
 }
예제 #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
 }
예제 #20
0
 private static bool IsCPU_eqm(MiningPair a)
 {
     return(a.Device.DeviceType == DeviceType.CPU);
 }
예제 #21
0
 private static bool IsDevice_eqm(MiningPair a)
 {
     return IsCPU_eqm(a) || IsNVIDIA_eqm(a);
 }
예제 #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;
 }
예제 #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);
 }
예제 #25
0
 // TODO remove or don't recheck
 public void InitBenchmarkSetup(MiningPair benchmarkPair)
 {
     InitMiningSetup(new MiningSetup(new List<MiningPair>() { benchmarkPair }));
     BenchmarkAlgorithm = benchmarkPair.Algorithm;
 }
예제 #26
0
 // nheqminer
 private static bool Is_nheqminer(MiningPair a, MiningPair b)
 {
     return(IsDevice_nheqminer(a) && IsDevice_nheqminer(b));
 }
예제 #27
0
 private static bool IsSameBinPath(MiningPair a, MiningPair b)
 {
     return(MinerPaths.GetOptimizedMinerPath(a)
            == MinerPaths.GetOptimizedMinerPath(b));
 }
예제 #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);
 }
예제 #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);
 }
예제 #32
0
 // nheqminer
 private static bool Is_nheqminer(MiningPair a, MiningPair b)
 {
     return IsDevice_nheqminer(a) && IsDevice_nheqminer(b);
 }
예제 #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);
 }
예제 #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);
 }
예제 #37
0
 // 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);
 }
예제 #39
0
 // eqm
 private static bool Is_eqm(MiningPair a, MiningPair b)
 {
     return IsDevice_eqm(a) && IsDevice_eqm(b);
 }