| 1 |
/* |
| 2 |
* xxhsum - Command line interface for xxhash algorithms |
| 3 |
* Copyright (C) 2013-2024 Yann Collet |
| 4 |
* |
| 5 |
* GPL v2 License |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License along |
| 18 |
* with this program; if not, write to the Free Software Foundation, Inc., |
| 19 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 |
* |
| 21 |
* You can contact the author at: |
| 22 |
* - xxHash homepage: https://www.xxhash.com |
| 23 |
* - xxHash source repository: https://github.com/Cyan4973/xxHash |
| 24 |
*/ |
| 25 |
|
| 26 |
int g_xsumarch_avoid_empty_unit = 0; |
| 27 |
|
| 28 |
#if ((defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC)) || defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP) |
| 29 |
#if defined(XXHSUM_DISPATCH) |
| 30 |
|
| 31 |
#include "../xxh_x86dispatch.h" |
| 32 |
|
| 33 |
const char* XSUM_autox86(void) |
| 34 |
{ |
| 35 |
int vecVersion = XXH_featureTest(); |
| 36 |
switch(vecVersion) { |
| 37 |
case XXH_SCALAR: |
| 38 |
return "x86 autoVec (scalar: no vector extension detected)"; |
| 39 |
case XXH_SSE2: |
| 40 |
return "x86 autoVec (SSE2 detected)"; |
| 41 |
case XXH_AVX2: |
| 42 |
return "x86 autoVec (AVX2 detected)"; |
| 43 |
case XXH_AVX512: |
| 44 |
return "x86 autoVec (AVX512 detected)"; |
| 45 |
default:; |
| 46 |
} |
| 47 |
return " autoVec (error detecting vector extension)"; |
| 48 |
} |
| 49 |
|
| 50 |
#endif /* XXHSUM_DISPATCH */ |
| 51 |
#endif /* x86 */ |