Merge pull request #217 from magnumripper/master
authorJens Steube <jens.steube@gmail.com>
Thu, 11 Feb 2016 09:08:57 +0000 (10:08 +0100)
committerJens Steube <jens.steube@gmail.com>
Thu, 11 Feb 2016 09:08:57 +0000 (10:08 +0100)
Use device's preferred vector width, not its native one.

src/oclHashcat.c

index 90976ee..de96437 100644 (file)
@@ -12526,11 +12526,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