示例#1
0
 public int?CanSolve(CPUProblem p)
 {
     if (p.RequiredThreads <= this.threads)
     {
         SolvingInfo.Solved(this.model, p.Name);
         return(p.Computation());
     }
     SolvingInfo.NotSolved(this.model, p.Name);
     return(null);
 }
示例#2
0
 public int?CanSolve(CPUProblem p)
 {
     if (DidThermalThrottle())
     {
         SolvingInfo.NotSolved(this.model, p.Name);
         return(null);
     }
     SolvingInfo.Solved(this.model, p.Name);
     this.temperature += CPUProblemTemperatureMultiplier * p.RequiredThreads;
     return(p.Computation());
 }
示例#3
0
        public int?CanSolve(GPUProblem p)
        {
            if (DidThermalThrottle())
            {
                SolvingInfo.NotSolved(this.model, p.Name);
                return(null);
            }
            SolvingInfo.Solved(this.model, p.Name);

            this.temperature += p.GpuTemperatureIncrease;
            return(p.Computation());
        }
示例#4
0
        public override int?CanSolve(NetworkProblem p)
        {
            int?result;

            if ((result = base.CanSolve(p)) != null)
            {
                SolvingInfo.Solved(this.model, p.Name);
                return(result);
            }
            SolvingInfo.NotSolved(this.model, p.Name);
            return(null);
        }
示例#5
0
        public override int?CanSolve(NetworkProblem p)
        {
            int?result;

            if (rng.NextDouble() < packetLossChance && (result = base.CanSolve(p)) != null)
            {
                SolvingInfo.Solved(this.model, p.Name);
                return(result);
            }

            SolvingInfo.NotSolved(this.model, p.Name);
            return(null);
        }
示例#6
0
 public int?CanSolve(NetworkProblem p)
 {
     SolvingInfo.NotSolved(this.model, p.Name);
     return(null);
 }