From: magnum Date: Wed, 10 Feb 2016 22:42:04 +0000 (+0100) Subject: Use device's preferred vector width, not the native one. Also, don't X-Git-Tag: v3.00-beta~300^2^2 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=162bc25a3d3a77f77eb66a3df5cd7364e88741c7;p=hashcat.git Use device's preferred vector width, not the native one. Also, don't assume vector width for 'long' is half of that for 'int'. --- diff --git a/src/oclHashcat.c b/src/oclHashcat.c index 3446559..4f28e52 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -12478,11 +12478,11 @@ int main (int argc, char **argv) { if (tuningdb_entry->vector_width == -1) { - hc_clGetDeviceInfo (data.ocl, device_param->device, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, sizeof (vector_width), &vector_width, NULL); - if (opti_type & OPTI_TYPE_USES_BITS_64) { - if (vector_width > 1) vector_width /= 2; + hc_clGetDeviceInfo (data.ocl, device_param->device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, sizeof (vector_width), &vector_width, NULL); + } else { + hc_clGetDeviceInfo (data.ocl, device_param->device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, sizeof (vector_width), &vector_width, NULL); } } else