Пример #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);
 }