More CUDA rewrites

This commit is contained in:
Jens Steube
2019-05-05 11:57:54 +02:00
parent ec9925f3b1
commit 08dc1acc02
4 changed files with 558 additions and 215 deletions

View File

@@ -349,6 +349,13 @@ HC_API_CALL void *thread_calc_stdin (void *p)
if (device_param->skipped_warning == true) return NULL;
if (device_param->is_cuda == true)
{
const int rc_cuCtxSetCurrent = hc_cuCtxSetCurrent (hashcat_ctx, device_param->cuda_context);
if (rc_cuCtxSetCurrent == -1) return NULL;
}
const int rc_calc = calc_stdin (hashcat_ctx, device_param);
if (rc_calc == -1)
@@ -1668,6 +1675,13 @@ HC_API_CALL void *thread_calc (void *p)
if (device_param->skipped_warning == true) return NULL;
if (device_param->is_cuda == true)
{
const int rc_cuCtxSetCurrent = hc_cuCtxSetCurrent (hashcat_ctx, device_param->cuda_context);
if (rc_cuCtxSetCurrent == -1) return NULL;
}
const int rc_calc = calc (hashcat_ctx, device_param);
if (rc_calc == -1)