Move instrinsic to A32 clang only
@@ -67,6 +67,20 @@ ASTCENC_SIMD_INLINE float32x4_t vminnmq_f32(float32x4_t a, float32x4_t b)
return vminq_f32(a, b);
}
+/**
+ * @brief Return a float rounded to the nearest integer value.
+ */
+ASTCENC_SIMD_INLINE float32x4_t vrndnq_f32(float32x4_t a)
+{
+ assert( std::fegetround() == FE_TONEAREST);
+ float a0 = std::nearbyintf(vgetq_lane_f32(a, 0));
+ float a1 = std::nearbyintf(vgetq_lane_f32(a, 1));
+ float a2 = std::nearbyintf(vgetq_lane_f32(a, 2));
+ float a3 = std::nearbyintf(vgetq_lane_f32(a, 3));
+ float32x4_t c { a0, a1, a2, a3 };
+ return c;
+}
+
#endif
/**
@@ -130,20 +144,6 @@ ASTCENC_SIMD_INLINE float32x4_t vsqrtq_f32(float32x4_t a)
return c;
}
-/**
- * @brief Return a float rounded to the nearest integer value.
- */
-ASTCENC_SIMD_INLINE float32x4_t vrndnq_f32(float32x4_t a)
-{
- assert( std::fegetround() == FE_TONEAREST);
- float a0 = std::nearbyintf(vgetq_lane_f32(a, 0));
- float a1 = std::nearbyintf(vgetq_lane_f32(a, 1));
- float a2 = std::nearbyintf(vgetq_lane_f32(a, 2));
- float a3 = std::nearbyintf(vgetq_lane_f32(a, 3));
- float32x4_t c { a0, a1, a2, a3 };
- return c;
-}
-
/**
* @brief Vector by vector division.
*/
