mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-05 04:35:46 +08:00
Ensure EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC is always defined on arm.
This commit is contained in:
parent
7465b7651e
commit
31cd2ad371
@ -617,9 +617,11 @@
|
|||||||
|
|
||||||
/// \internal EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC set to 1 if the architecture
|
/// \internal EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC set to 1 if the architecture
|
||||||
/// supports Neon vector intrinsics for fp16.
|
/// supports Neon vector intrinsics for fp16.
|
||||||
#if EIGEN_ARCH_ARM64
|
#if EIGEN_ARCH_ARM_OR_ARM64
|
||||||
#ifndef EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
#ifndef EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
||||||
#if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
// Clang only supports FP16 on aarch64, and not all intrinsics are available
|
||||||
|
// on A32 anyways even in GCC (e.g. vdiv_f16, vsqrt_f16).
|
||||||
|
#if EIGEN_ARCH_ARM64 && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
||||||
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 1
|
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 1
|
||||||
#else
|
#else
|
||||||
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 0
|
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 0
|
||||||
@ -629,9 +631,11 @@
|
|||||||
|
|
||||||
/// \internal EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC set to 1 if the architecture
|
/// \internal EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC set to 1 if the architecture
|
||||||
/// supports Neon scalar intrinsics for fp16.
|
/// supports Neon scalar intrinsics for fp16.
|
||||||
#if EIGEN_ARCH_ARM64
|
#if EIGEN_ARCH_ARM_OR_ARM64
|
||||||
#ifndef EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC
|
#ifndef EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC
|
||||||
#if defined(__ARM_FEATURE_FP16_SCALAR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
// Clang only supports FP16 on aarch64, and not all intrinsics are available
|
||||||
|
// on A32 anyways, even in GCC (e.g. vceqh_f16).
|
||||||
|
#if EIGEN_ARCH_ARM64 && defined(__ARM_FEATURE_FP16_SCALAR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
||||||
#define EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC 1
|
#define EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user