mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-10 05:54:21 +00:00
Iterate over each thread belonging to each device in the hashmeter instead of searching for them now that they're a list.
This commit is contained in:
parent
6e2c12eeb0
commit
44f5d55d51
@ -3302,12 +3302,9 @@ static void hashmeter(int thr_id, struct timeval *diff,
|
|||||||
|
|
||||||
/* Rolling average for each thread and each device */
|
/* Rolling average for each thread and each device */
|
||||||
decay_time(&thr->rolling, local_mhashes / secs);
|
decay_time(&thr->rolling, local_mhashes / secs);
|
||||||
for (i = 0; i < mining_threads; i++) {
|
for (i = 0; i < cgpu->threads; i++)
|
||||||
struct thr_info *th = &thr_info[i];
|
thread_rolling += cgpu->thr[i]->rolling;
|
||||||
|
|
||||||
if (th->cgpu == cgpu)
|
|
||||||
thread_rolling += th->rolling;
|
|
||||||
}
|
|
||||||
mutex_lock(&hash_lock);
|
mutex_lock(&hash_lock);
|
||||||
decay_time(&cgpu->rolling, thread_rolling);
|
decay_time(&cgpu->rolling, thread_rolling);
|
||||||
cgpu->total_mhashes += local_mhashes;
|
cgpu->total_mhashes += local_mhashes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user