mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Optimize String::isAscii using AVX2 or NEON (not tested with MSVC yet).
Added EE::System::CPU static class to query about CPU capabilities.
This commit is contained in:
@@ -316,6 +316,12 @@ typedef signed long long Int64;
|
||||
typedef unsigned long long Uint64;
|
||||
#endif
|
||||
|
||||
#if defined( __x86_64__ ) || defined( _M_X64 )
|
||||
#define EE_ARCH_X86_64
|
||||
#elif defined( __aarch64__ ) || defined( _M_ARM64 )
|
||||
#define EE_ARCH_ARM64
|
||||
#endif
|
||||
|
||||
#if defined( EE_LINUX_64 ) || defined( EE_SPARC_64 ) || defined( __osf__ ) || \
|
||||
( defined( _WIN64 ) && !defined( _XBOX ) ) || defined( __64BIT__ ) || defined( __LP64 ) || \
|
||||
defined( __LP64__ ) || defined( _LP64 ) || defined( _ADDR64 ) || defined( _CRAYC )
|
||||
|
||||
17
include/eepp/system/cpu.hpp
Normal file
17
include/eepp/system/cpu.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef EE_SYSTEM_CPU_HPP
|
||||
#define EE_SYSTEM_CPU_HPP
|
||||
|
||||
#include <eepp/config.hpp>
|
||||
|
||||
namespace EE { namespace System {
|
||||
|
||||
class EE_API CPU {
|
||||
public:
|
||||
static bool hasAVX2();
|
||||
|
||||
static bool hasNEON();
|
||||
};
|
||||
|
||||
}} // namespace EE::System
|
||||
|
||||
#endif // EE_SYSTEM_CPU_HPP
|
||||
Reference in New Issue
Block a user