summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-05-16 16:04:20 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-26 08:48:35 +0200
commit5b9cf5881ef53fac5f1d8376f687dbadf9d3cf2b (patch)
treeff16b0dcf62236c48fed6ca87e7d584959ed1841 /tools
parentfb1233d77500413ba237c335a84773d8a6f8e381 (diff)
tdf#142307 - Upgrade SSE2 sum to AVX512 sum with Neumaier 1
This part focuses on allowing it on replacing arrayfunctor By thefault it will try AVX512F (1,17%) If not available will use AVX (94,77%) Use of AVX2 (82,28%) has been avoided even if the code could been more compact Source of hardware statistics: https://store.steampowered.com/hwsurvey Change-Id: Iae737a565379e82c5f84f3fdee6321ac74f59d40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115675 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/misc/cpuid.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/source/misc/cpuid.cxx b/tools/source/misc/cpuid.cxx
index 0395d0e0f001..855b87e6da63 100644
--- a/tools/source/misc/cpuid.cxx
+++ b/tools/source/misc/cpuid.cxx
@@ -56,6 +56,7 @@ bool checkAVXSupportInOS()
#define XSAVE_bit (1 << 27)
#define AVX_bit (1 << 28)
#define AVX2_bit (1 << 5)
+#define AVX512F_bit (1 << 16)
InstructionSetFlags getCpuInstructionSetFlags()
{
@@ -98,6 +99,8 @@ InstructionSetFlags getCpuInstructionSetFlags()
if ((aExtendedInfo[1] & AVX2_bit) != 0)
eInstructions |= InstructionSetFlags::AVX2;
+ if ((aExtendedInfo[1] & AVX512F_bit) != 0)
+ eInstructions |= InstructionSetFlags::AVX512F;
}
}
}
@@ -127,6 +130,8 @@ OUString instructionSetSupportedString()
aString += "AVX ";
if (isCpuInstructionSetSupported(InstructionSetFlags::AVX2))
aString += "AVX2 ";
+ if (isCpuInstructionSetSupported(InstructionSetFlags::AVX512F))
+ aString += "AVX512F ";
return aString;
}