Merge branch 'release-5-0'
[alexxy/gromacs.git] / src / gromacs / gmxlib / gmx_cpuid.c
index f91e2b42c45f726b07b855f44b71f7b892d94fb2..44091a79e292e98818f25de455f0cfb5dd20f22c 100644 (file)
@@ -241,6 +241,18 @@ gmx_cpuid_feature           (gmx_cpuid_t                cpuid,
 }
 
 
+int
+gmx_cpuid_is_intel_nehalem  (const gmx_cpuid_t          cpuid)
+{
+    return (cpuid->vendor == GMX_CPUID_VENDOR_INTEL &&
+            cpuid->family == 6 &&
+            (cpuid->model == 0x2E ||
+             cpuid->model == 0x1A ||
+             cpuid->model == 0x1E ||
+             cpuid->model == 0x2F ||
+             cpuid->model == 0x2C ||
+             cpuid->model == 0x25));
+}
 
 
 /* What type of SIMD was compiled in, if any? */