From 57a149276c5a20d5af1b2364628b3a305772ab3d Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 6 Aug 2019 12:44:39 +0200 Subject: [PATCH] Do alias check only in case both CUDA and OpenCL devices were detected --- src/backend.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/backend.c b/src/backend.c index 4c0ff1179..832175b8a 100644 --- a/src/backend.c +++ b/src/backend.c @@ -6130,14 +6130,18 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) backend_ctx->backend_devices_cnt = cuda_devices_cnt + opencl_devices_cnt; backend_ctx->backend_devices_active = cuda_devices_active + opencl_devices_active; - // find duplicate devices (typically cuda and opencl!) - // using force here enables both devices, which is the worst possible outcome - // many users force by default, so this is not a good idea - - //if (user_options->force == false) - //{ - backend_ctx_find_alias_devices (hashcat_ctx); - //} + // find duplicate devices (typically CUDA and OpenCL) + + if ((cuda_devices_cnt > 0) && (opencl_devices_cnt > 0)) + { + // using force here enables both devices, which is the worst possible outcome + // many users force by default, so this is not a good idea + + //if (user_options->force == false) + //{ + backend_ctx_find_alias_devices (hashcat_ctx); + //{ + } if (backend_ctx->backend_devices_active == 0) {