Update cpuid, dr_libs and stb_vorbis libraries
- cpuid 8.0.0 - dr_libs 0.13.8 (4b3d078 2023-03-25) - stb_vorbis 1.22, removed dedicated repository submodule, replaced with directory
This commit is contained in:
parent
af7dae9cea
commit
8c48bdbf83
14 changed files with 5976 additions and 159 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -4,9 +4,6 @@
|
|||
[submodule "external/st_audiofile/thirdparty/dr_libs"]
|
||||
path = external/st_audiofile/thirdparty/dr_libs
|
||||
url = https://github.com/mackron/dr_libs.git
|
||||
[submodule "external/st_audiofile/thirdparty/stb_vorbis"]
|
||||
path = external/st_audiofile/thirdparty/stb_vorbis
|
||||
url = https://github.com/sfztools/stb_vorbis.git
|
||||
[submodule "external/st_audiofile/thirdparty/libaiff"]
|
||||
path = external/st_audiofile/thirdparty/libaiff
|
||||
url = https://github.com/sfztools/libaiff.git
|
||||
|
|
|
|||
2
external/st_audiofile/thirdparty/dr_libs
vendored
2
external/st_audiofile/thirdparty/dr_libs
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit cac1785cee4abb455817b43d5dee33b49d61be2f
|
||||
Subproject commit 4b3d07849537ce0b71b22180c0b1335eacc6e9be
|
||||
1
external/st_audiofile/thirdparty/stb_vorbis
vendored
1
external/st_audiofile/thirdparty/stb_vorbis
vendored
|
|
@ -1 +0,0 @@
|
|||
Subproject commit fc0bd698b26888da0a632da33f4c49b90763e69b
|
||||
37
external/st_audiofile/thirdparty/stb_vorbis/LICENSE
vendored
Normal file
37
external/st_audiofile/thirdparty/stb_vorbis/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
This software is available under 2 licenses -- choose whichever you prefer.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE A - MIT License
|
||||
Copyright (c) 2017 Sean Barrett
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
||||
This is free and unencumbered software released into the public domain.
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
commercial or non-commercial, and by any means.
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
this software under copyright law.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
5584
external/st_audiofile/thirdparty/stb_vorbis/stb_vorbis.c
vendored
Normal file
5584
external/st_audiofile/thirdparty/stb_vorbis/stb_vorbis.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
254
src/external/cpuid/platform/src/platform/config.hpp
vendored
254
src/external/cpuid/platform/src/platform/config.hpp
vendored
|
|
@ -12,148 +12,148 @@
|
|||
|
||||
// Detect operating systems
|
||||
#if defined(__linux__)
|
||||
#define PLATFORM_LINUX 1
|
||||
#if defined(__ANDROID__)
|
||||
#define PLATFORM_ANDROID 1
|
||||
#endif
|
||||
#define PLATFORM_LINUX 1
|
||||
#if defined(__ANDROID__)
|
||||
#define PLATFORM_ANDROID 1
|
||||
#endif
|
||||
#elif defined(_WIN32)
|
||||
#define PLATFORM_WINDOWS 1
|
||||
#if defined(WINAPI_FAMILY)
|
||||
#include <winapifamily.h>
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
||||
#define PLATFORM_WINDOWS_PHONE 1
|
||||
#endif
|
||||
#endif
|
||||
#define PLATFORM_WINDOWS 1
|
||||
#if defined(WINAPI_FAMILY)
|
||||
#include <winapifamily.h>
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
||||
#define PLATFORM_WINDOWS_PHONE 1
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
// Detect iOS before MacOSX (__MACH__ is also defined for iOS)
|
||||
#if defined(IPHONE)
|
||||
#define PLATFORM_IOS 1
|
||||
#elif defined(__MACH__)
|
||||
#define PLATFORM_MAC 1
|
||||
#endif
|
||||
// Detect iOS before MacOSX (__MACH__ is also defined for iOS)
|
||||
#if defined(IPHONE)
|
||||
#define PLATFORM_IOS 1
|
||||
#elif defined(__MACH__)
|
||||
#define PLATFORM_MAC 1
|
||||
#endif
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#define PLATFORM_EMSCRIPTEN 1
|
||||
#define PLATFORM_EMSCRIPTEN 1
|
||||
#else
|
||||
#error "Unable to determine operating system"
|
||||
#error "Unable to determine operating system"
|
||||
#endif
|
||||
|
||||
// Detect compilers and CPU architectures
|
||||
// Note: clang also defines __GNUC__ since it aims to be compatible with GCC.
|
||||
// Therefore we need to check for __clang__ or __llvm__ first.
|
||||
#if defined(__clang__) || defined(__llvm__)
|
||||
#define PLATFORM_CLANG 1
|
||||
#define PLATFORM_GCC_COMPATIBLE 1
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_CLANG_X86 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_X86 1
|
||||
#elif defined(__arm__) || defined (__arm64__) || defined (__aarch64__)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_CLANG_ARM 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ARM 1
|
||||
#elif defined(__mips__)
|
||||
#define PLATFORM_MIPS 1
|
||||
#define PLATFORM_CLANG_MIPS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_MIPS 1
|
||||
#elif defined(__asmjs__)
|
||||
#define PLATFORM_ASMJS 1
|
||||
#define PLATFORM_CLANG_ASMJS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ASMJS 1
|
||||
#endif
|
||||
#define PLATFORM_CLANG 1
|
||||
#define PLATFORM_GCC_COMPATIBLE 1
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_CLANG_X86 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_X86 1
|
||||
#elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_CLANG_ARM 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ARM 1
|
||||
#elif defined(__mips__)
|
||||
#define PLATFORM_MIPS 1
|
||||
#define PLATFORM_CLANG_MIPS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_MIPS 1
|
||||
#elif defined(__asmjs__)
|
||||
#define PLATFORM_ASMJS 1
|
||||
#define PLATFORM_CLANG_ASMJS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ASMJS 1
|
||||
#endif
|
||||
#elif defined(__GNUC__)
|
||||
#define PLATFORM_GCC 1
|
||||
#define PLATFORM_GCC_COMPATIBLE 1
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_GCC_X86 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_X86 1
|
||||
#elif defined(__arm__) || defined (__arm64__) || defined (__aarch64__)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_GCC_ARM 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ARM 1
|
||||
#elif defined(__mips__)
|
||||
#define PLATFORM_MIPS 1
|
||||
#define PLATFORM_GCC_MIPS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_MIPS 1
|
||||
#endif
|
||||
#define PLATFORM_GCC 1
|
||||
#define PLATFORM_GCC_COMPATIBLE 1
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_GCC_X86 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_X86 1
|
||||
#elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_GCC_ARM 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_ARM 1
|
||||
#elif defined(__mips__)
|
||||
#define PLATFORM_MIPS 1
|
||||
#define PLATFORM_GCC_MIPS 1
|
||||
#define PLATFORM_GCC_COMPATIBLE_MIPS 1
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#define PLATFORM_MSVC 1
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_MSVC_X86 1
|
||||
#elif defined(_M_ARM) || defined(_M_ARMT)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_MSVC_ARM 1
|
||||
#endif
|
||||
#define PLATFORM_MSVC 1
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
#define PLATFORM_X86 1
|
||||
#define PLATFORM_MSVC_X86 1
|
||||
#elif defined(_M_ARM) || defined(_M_ARMT)
|
||||
#define PLATFORM_ARM 1
|
||||
#define PLATFORM_MSVC_ARM 1
|
||||
#endif
|
||||
#else
|
||||
#error "Unable to determine compiler"
|
||||
#error "Unable to determine compiler"
|
||||
#endif
|
||||
|
||||
// Define macros for supported CPU instruction sets
|
||||
#if defined(PLATFORM_GCC_COMPATIBLE)
|
||||
#if defined(__MMX__)
|
||||
#define PLATFORM_MMX 1
|
||||
#endif
|
||||
#if defined(__SSE__)
|
||||
#define PLATFORM_SSE 1
|
||||
#endif
|
||||
#if defined(__SSE2__)
|
||||
#define PLATFORM_SSE2 1
|
||||
#endif
|
||||
#if defined(__SSE3__)
|
||||
#define PLATFORM_SSE3 1
|
||||
#endif
|
||||
#if defined(__SSSE3__)
|
||||
#define PLATFORM_SSSE3 1
|
||||
#endif
|
||||
#if defined(__SSE4_1__)
|
||||
#define PLATFORM_SSE41 1
|
||||
#endif
|
||||
#if defined(__SSE4_2__)
|
||||
#define PLATFORM_SSE42 1
|
||||
#endif
|
||||
#if defined(__PCLMUL__)
|
||||
#define PLATFORM_PCLMUL 1
|
||||
#endif
|
||||
#if defined(__AVX__)
|
||||
#define PLATFORM_AVX 1
|
||||
#endif
|
||||
#if defined(__AVX2__)
|
||||
#define PLATFORM_AVX2 1
|
||||
#endif
|
||||
#if defined(__ARM_NEON__) || defined (__ARM_NEON)
|
||||
#define PLATFORM_NEON 1
|
||||
#endif
|
||||
// First, check the PLATFORM_WINDOWS_PHONE define, because
|
||||
// the X86 instructions sets are not supported on the Windows Phone emulator
|
||||
#elif defined(PLATFORM_WINDOWS_PHONE)
|
||||
#if defined(PLATFORM_MSVC_ARM)
|
||||
// NEON introduced in VS2012
|
||||
#if (_MSC_VER >= 1700)
|
||||
#define PLATFORM_NEON 1
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(PLATFORM_MSVC_X86)
|
||||
// MMX, SSE and SSE2 introduced in VS2003
|
||||
#if (_MSC_VER >= 1310)
|
||||
#define PLATFORM_MMX 1
|
||||
#define PLATFORM_SSE 1
|
||||
#define PLATFORM_SSE2 1
|
||||
#endif
|
||||
// SSE3 introduced in VS2005
|
||||
#if (_MSC_VER >= 1400)
|
||||
#define PLATFORM_SSE3 1
|
||||
#endif
|
||||
// SSSE3, SSE4.1, SSE4.2, PCLMUL introduced in VS2008
|
||||
#if (_MSC_VER >= 1500)
|
||||
#define PLATFORM_SSSE3 1
|
||||
#define PLATFORM_SSE41 1
|
||||
#define PLATFORM_SSE42 1
|
||||
#define PLATFORM_PCLMUL 1
|
||||
#endif
|
||||
// AVX and AVX2 introduced in VS2012
|
||||
#if (_MSC_VER >= 1700)
|
||||
#define PLATFORM_AVX 1
|
||||
#define PLATFORM_AVX2 1
|
||||
#endif
|
||||
#if defined(__MMX__)
|
||||
#define PLATFORM_MMX 1
|
||||
#endif
|
||||
#if defined(__SSE__)
|
||||
#define PLATFORM_SSE 1
|
||||
#endif
|
||||
#if defined(__SSE2__)
|
||||
#define PLATFORM_SSE2 1
|
||||
#endif
|
||||
#if defined(__SSE3__)
|
||||
#define PLATFORM_SSE3 1
|
||||
#endif
|
||||
#if defined(__SSSE3__)
|
||||
#define PLATFORM_SSSE3 1
|
||||
#endif
|
||||
#if defined(__SSE4_1__)
|
||||
#define PLATFORM_SSE41 1
|
||||
#endif
|
||||
#if defined(__SSE4_2__)
|
||||
#define PLATFORM_SSE42 1
|
||||
#endif
|
||||
#if defined(__PCLMUL__)
|
||||
#define PLATFORM_PCLMUL 1
|
||||
#endif
|
||||
#if defined(__AVX__)
|
||||
#define PLATFORM_AVX 1
|
||||
#endif
|
||||
#if defined(__AVX2__)
|
||||
#define PLATFORM_AVX2 1
|
||||
#endif
|
||||
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||
#define PLATFORM_NEON 1
|
||||
#endif
|
||||
// First, check the PLATFORM_WINDOWS_PHONE define, because
|
||||
// the X86 instructions sets are not supported on the Windows Phone emulator
|
||||
#elif defined(PLATFORM_WINDOWS_PHONE)
|
||||
#if defined(PLATFORM_MSVC_ARM)
|
||||
// NEON introduced in VS2012
|
||||
#if (_MSC_VER >= 1700)
|
||||
#define PLATFORM_NEON 1
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(PLATFORM_MSVC_X86)
|
||||
// MMX, SSE and SSE2 introduced in VS2003
|
||||
#if (_MSC_VER >= 1310)
|
||||
#define PLATFORM_MMX 1
|
||||
#define PLATFORM_SSE 1
|
||||
#define PLATFORM_SSE2 1
|
||||
#endif
|
||||
// SSE3 introduced in VS2005
|
||||
#if (_MSC_VER >= 1400)
|
||||
#define PLATFORM_SSE3 1
|
||||
#endif
|
||||
// SSSE3, SSE4.1, SSE4.2, PCLMUL introduced in VS2008
|
||||
#if (_MSC_VER >= 1500)
|
||||
#define PLATFORM_SSSE3 1
|
||||
#define PLATFORM_SSE41 1
|
||||
#define PLATFORM_SSE42 1
|
||||
#define PLATFORM_PCLMUL 1
|
||||
#endif
|
||||
// AVX and AVX2 introduced in VS2012
|
||||
#if (_MSC_VER >= 1700)
|
||||
#define PLATFORM_AVX 1
|
||||
#define PLATFORM_AVX2 1
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
107
src/external/cpuid/src/cpuid/cpuinfo.cpp
vendored
107
src/external/cpuid/src/cpuid/cpuinfo.cpp
vendored
|
|
@ -9,17 +9,17 @@
|
|||
#include "detail/cpuinfo_impl.hpp"
|
||||
|
||||
#if defined(PLATFORM_GCC_COMPATIBLE_X86)
|
||||
#include "detail/init_gcc_x86.hpp"
|
||||
#include "detail/init_gcc_x86.hpp"
|
||||
#elif defined(PLATFORM_MSVC_X86) && !defined(PLATFORM_WINDOWS_PHONE)
|
||||
#include "detail/init_msvc_x86.hpp"
|
||||
#include "detail/init_msvc_x86.hpp"
|
||||
#elif defined(PLATFORM_MSVC_ARM)
|
||||
#include "detail/init_msvc_arm.hpp"
|
||||
#include "detail/init_msvc_arm.hpp"
|
||||
#elif defined(PLATFORM_CLANG_ARM) && defined(PLATFORM_IOS)
|
||||
#include "detail/init_ios_clang_arm.hpp"
|
||||
#include "detail/init_ios_clang_arm.hpp"
|
||||
#elif defined(PLATFORM_GCC_COMPATIBLE_ARM) && defined(PLATFORM_LINUX)
|
||||
#include "detail/init_linux_gcc_arm.hpp"
|
||||
#include "detail/init_linux_gcc_arm.hpp"
|
||||
#else
|
||||
#include "detail/init_unknown.hpp"
|
||||
#include "detail/init_unknown.hpp"
|
||||
#endif
|
||||
|
||||
namespace cpuid
|
||||
|
|
@ -28,8 +28,7 @@ namespace cpuid
|
|||
inline namespace STEINWURF_CPUID_VERSION
|
||||
{
|
||||
|
||||
cpuinfo::cpuinfo() :
|
||||
m_impl(new impl)
|
||||
cpuinfo::cpuinfo() : m_impl(new impl)
|
||||
{
|
||||
init_cpuinfo(*m_impl);
|
||||
}
|
||||
|
|
@ -94,7 +93,97 @@ bool cpuinfo::has_avx2() const
|
|||
return m_impl->m_has_avx2;
|
||||
}
|
||||
|
||||
// ARM functions
|
||||
bool cpuinfo::has_avx512_f() const
|
||||
{
|
||||
return m_impl->m_has_avx512_f;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_dq() const
|
||||
{
|
||||
return m_impl->m_has_avx512_dq;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_ifma() const
|
||||
{
|
||||
return m_impl->m_has_avx512_ifma;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_pf() const
|
||||
{
|
||||
return m_impl->m_has_avx512_pf;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_er() const
|
||||
{
|
||||
return m_impl->m_has_avx512_er;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_cd() const
|
||||
{
|
||||
return m_impl->m_has_avx512_cd;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_bw() const
|
||||
{
|
||||
return m_impl->m_has_avx512_bw;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vl() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vl;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vbmi() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vbmi;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vbmi2() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vbmi2;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vnni() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vnni;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_bitalg() const
|
||||
{
|
||||
return m_impl->m_has_avx512_bitalg;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vpopcntdq() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vpopcntdq;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_4vnniw() const
|
||||
{
|
||||
return m_impl->m_has_avx512_4vnniw;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_4fmaps() const
|
||||
{
|
||||
return m_impl->m_has_avx512_4fmaps;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_avx512_vp2intersect() const
|
||||
{
|
||||
return m_impl->m_has_avx512_vp2intersect;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_f16c() const
|
||||
{
|
||||
return m_impl->m_has_f16c;
|
||||
}
|
||||
|
||||
bool cpuinfo::has_aes() const
|
||||
{
|
||||
return m_impl->m_has_aes;
|
||||
}
|
||||
|
||||
// ARM member functions
|
||||
bool cpuinfo::has_neon() const
|
||||
{
|
||||
return m_impl->m_has_neon;
|
||||
|
|
|
|||
89
src/external/cpuid/src/cpuid/cpuinfo.hpp
vendored
89
src/external/cpuid/src/cpuid/cpuinfo.hpp
vendored
|
|
@ -14,7 +14,7 @@ namespace cpuid
|
|||
inline namespace STEINWURF_CPUID_VERSION
|
||||
{
|
||||
/// The cpuinfo object extract information about which, if any, additional
|
||||
/// instructiions are supported by the CPU.
|
||||
/// instructions are supported by the CPU.
|
||||
class cpuinfo
|
||||
{
|
||||
public:
|
||||
|
|
@ -24,40 +24,105 @@ public:
|
|||
/// Destructor
|
||||
~cpuinfo();
|
||||
|
||||
/// Has X87 FPU
|
||||
/// Return true if the CPU supports x87 Floating-Point Unit
|
||||
bool has_fpu() const;
|
||||
|
||||
/// Return true if the CPU supports MMX
|
||||
bool has_mmx() const;
|
||||
|
||||
/// Return true if the CPU supports SSE
|
||||
/// Return true if the CPU supports Streaming SIMD Extensions
|
||||
bool has_sse() const;
|
||||
|
||||
/// Return true if the CPU supports SSE2
|
||||
/// Return true if the CPU supports Streaming SIMD Extensions 2
|
||||
bool has_sse2() const;
|
||||
|
||||
/// Return true if the CPU supports SSE3
|
||||
/// Return true if the CPU supports Streaming SIMD Extensions 3
|
||||
bool has_sse3() const;
|
||||
|
||||
/// Return true if the CPU supports SSSE3
|
||||
/// Return true if the CPU supports Supplemental Streaming SIMD Extensions 3
|
||||
bool has_ssse3() const;
|
||||
|
||||
/// Return true if the CPU supports SSE 4.1
|
||||
/// Return true if the CPU supports Streaming SIMD Extensions 4.1
|
||||
bool has_sse4_1() const;
|
||||
|
||||
/// Return true if the CPU supports SSE 4.2
|
||||
/// Return true if the CPU supports Streaming SIMD Extensions 4.2
|
||||
bool has_sse4_2() const;
|
||||
|
||||
/// Return true if the CPU supports pclmulqdq
|
||||
/// Return true if the CPU supports carry-less multiplication of two 64-bit
|
||||
/// polynomials over the finite field GF(2)
|
||||
bool has_pclmulqdq() const;
|
||||
|
||||
/// Return true if the CPU supports AVX
|
||||
/// Return true if the CPU supports Advanced Vector Extensions
|
||||
bool has_avx() const;
|
||||
|
||||
/// Return true if the CPU supports AVX2
|
||||
/// Return true if the CPU supports Advanced Vector Extensions 2
|
||||
bool has_avx2() const;
|
||||
|
||||
/// ARM member functions
|
||||
/// Return true if the CPU supports AVX-512 Foundation
|
||||
bool has_avx512_f() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Doubleword and Quadword
|
||||
/// Instructions
|
||||
bool has_avx512_dq() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Integer Fused Multiply Add
|
||||
bool has_avx512_ifma() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Prefetch Instructions
|
||||
bool has_avx512_pf() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Exponential and Reciprocal
|
||||
/// Instructions
|
||||
bool has_avx512_er() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Conflict Detection Instructions
|
||||
bool has_avx512_cd() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Byte and Word Instructions
|
||||
bool has_avx512_bw() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Length Extensions
|
||||
bool has_avx512_vl() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Byte Manipulation
|
||||
/// Instructions
|
||||
bool has_avx512_vbmi() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Byte Manipulation
|
||||
/// Instructions 2
|
||||
bool has_avx512_vbmi2() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Neural Network
|
||||
/// Instructions
|
||||
bool has_avx512_vnni() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Bit Algorithms
|
||||
bool has_avx512_bitalg() const;
|
||||
|
||||
/// Return true if the CPU supports Vector population count instruction
|
||||
bool has_avx512_vpopcntdq() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Neural Network
|
||||
/// Instructions Word variable precision
|
||||
bool has_avx512_4vnniw() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Fused Multiply Accumulation
|
||||
/// Packed Single precision
|
||||
bool has_avx512_4fmaps() const;
|
||||
|
||||
/// Return true if the CPU supports AVX-512 Vector Pair Intersection to a
|
||||
/// Pair of Mask Registers
|
||||
bool has_avx512_vp2intersect() const;
|
||||
|
||||
/// Return true if the CPU supports converting between half-precision and
|
||||
/// standard IEEE single-precision floating-point formats
|
||||
bool has_f16c() const;
|
||||
|
||||
/// Return true if the CPU supports Advanced Encryption Standard instruction
|
||||
/// set
|
||||
bool has_aes() const;
|
||||
|
||||
/// Return true if the CPU supports ARM Advanced SIMD
|
||||
bool has_neon() const;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,15 @@ struct cpuinfo::impl
|
|||
m_has_fpu(false), m_has_mmx(false), m_has_sse(false), m_has_sse2(false),
|
||||
m_has_sse3(false), m_has_ssse3(false), m_has_sse4_1(false),
|
||||
m_has_sse4_2(false), m_has_pclmulqdq(false), m_has_avx(false),
|
||||
m_has_avx2(false), m_has_neon(false)
|
||||
m_has_avx2(false), m_has_avx512_f(false), m_has_avx512_dq(false),
|
||||
m_has_avx512_ifma(false), m_has_avx512_pf(false),
|
||||
m_has_avx512_er(false), m_has_avx512_cd(false), m_has_avx512_bw(false),
|
||||
m_has_avx512_vl(false), m_has_avx512_vbmi(false),
|
||||
m_has_avx512_vbmi2(false), m_has_avx512_vnni(false),
|
||||
m_has_avx512_bitalg(false), m_has_avx512_vpopcntdq(false),
|
||||
m_has_avx512_4vnniw(false), m_has_avx512_4fmaps(false),
|
||||
m_has_avx512_vp2intersect(false), m_has_f16c(false), m_has_aes(false),
|
||||
m_has_neon(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,6 +41,24 @@ struct cpuinfo::impl
|
|||
bool m_has_pclmulqdq;
|
||||
bool m_has_avx;
|
||||
bool m_has_avx2;
|
||||
bool m_has_avx512_f;
|
||||
bool m_has_avx512_dq;
|
||||
bool m_has_avx512_ifma;
|
||||
bool m_has_avx512_pf;
|
||||
bool m_has_avx512_er;
|
||||
bool m_has_avx512_cd;
|
||||
bool m_has_avx512_bw;
|
||||
bool m_has_avx512_vl;
|
||||
bool m_has_avx512_vbmi;
|
||||
bool m_has_avx512_vbmi2;
|
||||
bool m_has_avx512_vnni;
|
||||
bool m_has_avx512_bitalg;
|
||||
bool m_has_avx512_vpopcntdq;
|
||||
bool m_has_avx512_4vnniw;
|
||||
bool m_has_avx512_4fmaps;
|
||||
bool m_has_avx512_vp2intersect;
|
||||
bool m_has_f16c;
|
||||
bool m_has_aes;
|
||||
bool m_has_neon;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,32 @@ void extract_x86_flags(cpuinfo::impl& info, uint32_t ecx, uint32_t edx)
|
|||
info.m_has_sse4_2 = (ecx & (1 << 20)) != 0;
|
||||
info.m_has_pclmulqdq = (ecx & (1 << 1)) != 0;
|
||||
info.m_has_avx = (ecx & (1 << 28)) != 0;
|
||||
info.m_has_aes = (ecx & (1 << 25)) != 0;
|
||||
info.m_has_f16c = (ecx & (1 << 29)) != 0;
|
||||
}
|
||||
|
||||
void extract_x86_extended_flags(cpuinfo::impl& info, uint32_t ebx)
|
||||
void extract_x86_extended_flags(cpuinfo::impl& info, uint32_t ebx, uint32_t ecx,
|
||||
uint32_t edx)
|
||||
{
|
||||
// Extended instruction set flags
|
||||
|
||||
info.m_has_avx2 = (ebx & (1 << 5)) != 0;
|
||||
info.m_has_avx512_f = (ebx & (1 << 16)) != 0;
|
||||
info.m_has_avx512_dq = (ebx & (1 << 17)) != 0;
|
||||
info.m_has_avx512_ifma = (ebx & (1 << 21)) != 0;
|
||||
info.m_has_avx512_pf = (ebx & (1 << 26)) != 0;
|
||||
info.m_has_avx512_er = (ebx & (1 << 27)) != 0;
|
||||
info.m_has_avx512_cd = (ebx & (1 << 28)) != 0;
|
||||
info.m_has_avx512_bw = (ebx & (1 << 30)) != 0;
|
||||
info.m_has_avx512_vl = (ebx & (1 << 31)) != 0;
|
||||
info.m_has_avx512_vbmi = (ecx & (1 << 1)) != 0;
|
||||
info.m_has_avx512_vbmi2 = (ecx & (1 << 6)) != 0;
|
||||
info.m_has_avx512_vnni = (ecx & (1 << 11)) != 0;
|
||||
info.m_has_avx512_bitalg = (ecx & (1 << 12)) != 0;
|
||||
info.m_has_avx512_vpopcntdq = (ecx & (1 << 14)) != 0;
|
||||
info.m_has_avx512_4vnniw = (edx & (1 << 2)) != 0;
|
||||
info.m_has_avx512_4fmaps = (edx & (1 << 3)) != 0;
|
||||
info.m_has_avx512_vp2intersect = (edx & (1 << 8)) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void init_cpuinfo(cpuinfo::impl& info)
|
|||
if (maximum_index >= 7U)
|
||||
{
|
||||
run_cpuid(7, 0, output);
|
||||
extract_x86_extended_flags(info, output[1]);
|
||||
extract_x86_extended_flags(info, output[1], output[2], output[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ void init_cpuinfo(cpuinfo::impl& info)
|
|||
if (maximum_eax >= 7U)
|
||||
{
|
||||
__cpuidex(registers, 7, 0);
|
||||
extract_x86_extended_flags(info, registers[1]);
|
||||
extract_x86_extended_flags(info, registers[1], registers[2],
|
||||
registers[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
src/external/cpuid/src/cpuid/version.cpp
vendored
2
src/external/cpuid/src/cpuid/version.cpp
vendored
|
|
@ -12,7 +12,7 @@ inline namespace STEINWURF_CPUID_VERSION
|
|||
{
|
||||
std::string version()
|
||||
{
|
||||
return "6.3.1";
|
||||
return "8.0.0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
src/external/cpuid/src/cpuid/version.hpp
vendored
2
src/external/cpuid/src/cpuid/version.hpp
vendored
|
|
@ -11,7 +11,7 @@ namespace cpuid
|
|||
{
|
||||
/// Here we define the STEINWURF_CPUID_VERSION this should be updated on each
|
||||
/// release
|
||||
#define STEINWURF_CPUID_VERSION v6_3_1
|
||||
#define STEINWURF_CPUID_VERSION v8_0_0
|
||||
|
||||
inline namespace STEINWURF_CPUID_VERSION
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue