mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
bc8bc7d1a8
ErrorValues -> error_code, Architecture -> architecture
31 lines
678 B
C++
31 lines
678 B
C++
#ifndef SIMDJSON_ARCHITECTURE_H
|
|
#define SIMDJSON_ARCHITECTURE_H
|
|
|
|
namespace simdjson {
|
|
|
|
// Represents the minimal architecture that would support an implementation
|
|
enum class architecture {
|
|
UNSUPPORTED,
|
|
WESTMERE,
|
|
HASWELL,
|
|
ARM64,
|
|
// TODO remove 'native' in favor of runtime dispatch?
|
|
// the 'native' enum class value should point at a good default on the current
|
|
// machine
|
|
#ifdef IS_X86_64
|
|
NATIVE = WESTMERE
|
|
#elif defined(IS_ARM64)
|
|
NATIVE = ARM64
|
|
#endif
|
|
};
|
|
|
|
architecture find_best_supported_architecture();
|
|
architecture parse_architecture(char *arch_name);
|
|
|
|
// backcompat
|
|
using Architecture = architecture;
|
|
|
|
} // namespace simdjson
|
|
|
|
#endif // SIMDJSON_ARCHITECTURE_H
|