"maximum" 与 NEON 内在函数中的 "maximum number"

"maximum" vs "maximum number" in NEON intrinsics

NEON 内在函数描述中的“最大”和“最大数”有什么区别?例如。 (来自 https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

float32x4_t vmaxq_f32 (float32x4_t a, float32x4_t b)

Floating-point Maximum (vector). This instruction compares corresponding vector elements in the two source SIMD&FP registers, places the larger of each of the two floating-point values into a vector, and writes the vector to the destination SIMD&FP register.

float32x4_t vmaxnmq_f32 (float32x4_t a, float32x4_t b)

Floating-point Maximum Number (vector). This instruction compares corresponding vector elements in the two source SIMD&FP registers, writes the larger of the two floating-point values into a vector, and writes the vector to the destination SIMD&FP register.

只是对 NaN 的不同处理方式吗?

Is it just different treatment of NaNs?

是的。

Armv8 参考手册中的 FMAXNM 说。

NaNs are handled according to the IEEE 754-2008 standard. If one vector element is numeric and the other is a quiet NaN, the result placed in the vector is the numerical value, otherwise the result is identical to FMAX.