1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Make it a real balancing loop

This commit is contained in:
Jens Steube 2016-05-26 00:51:11 +02:00
parent 167d763795
commit ca8bb56404

View File

@ -2975,6 +2975,8 @@ static void autotune (hc_device_param_t *device_param)
exec_ms_pre_final = MIN (exec_ms_pre_final, exec_ms_pre_final_v); exec_ms_pre_final = MIN (exec_ms_pre_final, exec_ms_pre_final_v);
} }
u32 diff = kernel_loops - kernel_accel;
if ((kernel_loops_min < kernel_loops_max) && (kernel_accel_min < kernel_accel_max)) if ((kernel_loops_min < kernel_loops_max) && (kernel_accel_min < kernel_accel_max))
{ {
for (u32 f = 2; f < 1024; f++) for (u32 f = 2; f < 1024; f++)
@ -2985,6 +2987,10 @@ static void autotune (hc_device_param_t *device_param)
if (kernel_accel_try > kernel_accel_max) break; if (kernel_accel_try > kernel_accel_max) break;
if (kernel_loops_try < kernel_loops_min) break; if (kernel_loops_try < kernel_loops_min) break;
u32 diff_new = kernel_loops_try - kernel_accel_try;
if (diff_new > diff) break;
double exec_ms = try_run (device_param, kernel_accel_try, kernel_loops_try); double exec_ms = try_run (device_param, kernel_accel_try, kernel_loops_try);
for (int i = 0; i < VERIFIER_CNT; i++) for (int i = 0; i < VERIFIER_CNT; i++)