MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / abs

Function abs

Source/astcenc_vecmathlib_neon_4.h:756–761  ·  view source on GitHub ↗

* @brief Return the absolute value of the float vector. */

Source from the content-addressed store, hash-verified

754 * @brief Return the absolute value of the float vector.
755 */
756ASTCENC_SIMD_INLINE vfloat4 abs(vfloat4 a)
757{
758 float32x4_t zero = vdupq_n_f32(0.0f);
759 float32x4_t inv = vsubq_f32(zero, a.m);
760 return vfloat4(vmaxq_f32(a.m, inv));
761}
762
763/**
764 * @brief Return a float rounded to the nearest integer value.

Callers

nothing calls this directly

Calls 1

vfloat4Class · 0.70

Tested by

no test coverage detected