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); }
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); }
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()); }
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); }
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); }
public virtual int?TrySolve(GPUProblem p) { Console.WriteLine("Problem {0} - failed to solve with CPU {1}", p.Name, model); return(null); }
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);
public int?Solve(GPUProblem problem) { Console.WriteLine($"CPU {model} cannot solve {problem.Name}"); return(null); }
public bool visit(GPUProblem problem) { return(false); }
public int?Visit(GPUProblem gPUProblem) { System.Console.WriteLine($"{this.model} failed to resolve the problem"); return(null); }