Esempio n. 1
0
 public int?Visit(GPUProblem gPUProblem)
 {
     if (!DidThermalThrottle())
     {
         this.temperature += gPUProblem.GpuTemperatureIncrease;
         System.Console.WriteLine($"{this.model} resolved the problem");
         return(gPUProblem.Computation());
     }
     System.Console.WriteLine($"{this.model} failed to resolve the problem");
     return(null);
 }
Esempio n. 2
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());
        }
Esempio n. 3
0
 public virtual int?TrySolve(GPUProblem p)
 {
     if (temperature <= MaxTemperature)
     {
         temperature += p.GpuTemperatureIncrease;
         DidThermalThrottle();
         Console.WriteLine("Problem {0} - solved with GPU {1}", p.Name, model);
         return(p.Computation());
     }
     Console.WriteLine("Problem {0} - failed to solve with GPU {1}", p.Name, model);
     return(null);
 }