Reputation: 170815
What is the difference between "maximum" and "maximum number" in the description of NEON intrinsics? E.g. (from 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.
and
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.
Is it just different treatment of NaNs?
Upvotes: 1
Views: 476
Reputation: 12159
Is it just different treatment of NaNs?
Yes.
FMAXNM in the Armv8 reference manual says.
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.
Upvotes: 3