mirror of
https://github.com/ruby/ruby.git
synced 2026-08-01 16:00:28 +08:00
20 lines
614 B
C
20 lines
614 B
C
/**
|
|
* @file compiler/accel.h
|
|
*/
|
|
#ifndef PRISM_COMPILER_ACCEL_H
|
|
#define PRISM_COMPILER_ACCEL_H
|
|
|
|
/**
|
|
* Platform detection for SIMD/fast-path implementations. At most one of these
|
|
* macros is defined, selecting the best available vectorization strategy.
|
|
*/
|
|
#if (defined(__aarch64__) && defined(__ARM_NEON)) || (defined(_MSC_VER) && defined(_M_ARM64))
|
|
# define PRISM_HAS_NEON
|
|
#elif (defined(__x86_64__) && defined(__SSSE3__)) || (defined(_MSC_VER) && defined(_M_X64))
|
|
# define PRISM_HAS_SSSE3
|
|
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
# define PRISM_HAS_SWAR
|
|
#endif
|
|
|
|
#endif
|