mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 14:04:25 +00:00
Fix 4 * 0 being 0 that would break dynamic intensity mode.
This commit is contained in:
parent
d15c70f8a8
commit
55396f534e
@ -1587,7 +1587,7 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
|
|||||||
gpu_us = us_tdiff(&tv_gpuend, &gpu->tv_gpustart) / gpu->intervals;
|
gpu_us = us_tdiff(&tv_gpuend, &gpu->tv_gpustart) / gpu->intervals;
|
||||||
/* Very rarely we may get an overflow so put an upper
|
/* Very rarely we may get an overflow so put an upper
|
||||||
* limit on the detected time */
|
* limit on the detected time */
|
||||||
if (gpu_us > gpu->gpu_us_average * 4)
|
if (unlikely(gpu->gpu_us_average > 0 && gpu_us > gpu->gpu_us_average * 4))
|
||||||
gpu_us = gpu->gpu_us_average * 4;
|
gpu_us = gpu->gpu_us_average * 4;
|
||||||
gpu->gpu_us_average = (gpu->gpu_us_average + gpu_us * 0.63) / 1.63;
|
gpu->gpu_us_average = (gpu->gpu_us_average + gpu_us * 0.63) / 1.63;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user