Beispiel #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);
 }
Beispiel #2
0
 public bool visit(GPUProblem problem)
 {
     // Console.WriteLine(model + " with temperature: " + temperature + " and Maxtempeture: " + MaxTemperature);
     if (DidThermalThrottle())
     {
         return(false);
     }
     temperature += problem.GpuTemperatureIncrease;
     //  Console.WriteLine(model + " solved :" + nameof(GPUProblem)+" "+problem.Name + " Current tempeture: " + temperature);
     return(true);
 }
Beispiel #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());
        }
Beispiel #4
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);
 }
Beispiel #5
0
 public int?Solve(GPUProblem problem)
 {
     if (temperature <= MaxTemperature)
     {
         temperature += problem.GpuTemperatureIncrease;
         Console.WriteLine($"GPU {model} solve {problem.Name}, temperature: {temperature}");
         return(temperature);
     }
     else
     {
         DidThermalThrottle();
         return(null);
     }
 }
 public override int?Solve(GPUProblem problem)
 {
     Console.WriteLine($"Device {DeviceType} cannot solve {problem.Name}");
     return(null);
 }
Beispiel #7
0
 public virtual int?TrySolve(GPUProblem p)
 {
     Console.WriteLine("Problem {0} - failed to solve with CPU {1}", p.Name, model);
     return(null);
 }
Beispiel #8
0
 public bool visit(GPUProblem problem)
 {
     // Console.WriteLine("*******************" + model + " cant solve "+" "+nameof(GPUProblem)+" "+problem.Name);
     return(false);
 }
 public int?CanSolve(GPUProblem p)
 {
     SolvingInfo.NotSolved(this.model, p.Name);
     return(null);
 }
 abstract public int?Solve(GPUProblem problem);
Beispiel #11
0
 public int?Solve(GPUProblem problem)
 {
     Console.WriteLine($"CPU {model} cannot solve {problem.Name}");
     return(null);
 }
Beispiel #12
0
 public bool visit(GPUProblem problem)
 {
     return(false);
 }
 public int?Visit(GPUProblem gPUProblem)
 {
     System.Console.WriteLine($"{this.model} failed to resolve the problem");
     return(null);
 }