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); }
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); }
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); }
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; }
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); }
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); }
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); }
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; }
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); }
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); }
private static bool IsNotCpuGroups(MiningPair a, MiningPair b) { return a.Device.DeviceType != DeviceType.CPU && b.Device.DeviceType != DeviceType.CPU; }
private static bool IsSameBinPath(MiningPair a, MiningPair b) { return MinerPaths.GetOptimizedMinerPath(a) == MinerPaths.GetOptimizedMinerPath(b); }
private static bool IsSameAlgorithmType(MiningPair a, MiningPair b) { return a.Algorithm.NiceHashID == b.Algorithm.NiceHashID; }
private static bool IsDevice_eqm(MiningPair a) { return(IsCPU_eqm(a) || IsNVIDIA_eqm(a)); }
private static bool IsNVIDIA_eqm(MiningPair a) { var groupType = a.Device.DeviceGroupType; return(DeviceGroupType.NVIDIA_5_x == groupType || DeviceGroupType.NVIDIA_6_x == groupType); }
private static bool IsCPU_eqm(MiningPair a) { return MinersManager.EquihashCPU_USE_eqm() && a.Device.DeviceType == DeviceType.CPU; }
// 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 }
private static bool IsCPU_eqm(MiningPair a) { return(a.Device.DeviceType == DeviceType.CPU); }
private static bool IsDevice_eqm(MiningPair a) { return IsCPU_eqm(a) || IsNVIDIA_eqm(a); }
private static bool IsNVIDIA_eqm(MiningPair a) { var groupType = a.Device.DeviceGroupType; return DeviceGroupType.NVIDIA_5_x == groupType || DeviceGroupType.NVIDIA_6_x == groupType; }
// 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); }
// TODO remove or don't recheck public void InitBenchmarkSetup(MiningPair benchmarkPair) { InitMiningSetup(new MiningSetup(new List<MiningPair>() { benchmarkPair })); BenchmarkAlgorithm = benchmarkPair.Algorithm; }
// nheqminer private static bool Is_nheqminer(MiningPair a, MiningPair b) { return(IsDevice_nheqminer(a) && IsDevice_nheqminer(b)); }
private static bool IsSameBinPath(MiningPair a, MiningPair b) { return(MinerPaths.GetOptimizedMinerPath(a) == MinerPaths.GetOptimizedMinerPath(b)); }
// 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); }
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); }
// nheqminer private static bool Is_nheqminer(MiningPair a, MiningPair b) { return IsDevice_nheqminer(a) && IsDevice_nheqminer(b); }
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); }
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); }
// eqm private static bool Is_eqm(MiningPair a, MiningPair b) { return IsDevice_eqm(a) && IsDevice_eqm(b); }