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

Function abs

Source/astcenc_vecmathlib_avx2_8.h:768–772  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

766 * @brief Return the absolute value of the float vector.
767 */
768ASTCENC_SIMD_INLINE vfloat8 abs(vfloat8 a)
769{
770 __m256 msk = _mm256_castsi256_ps(_mm256_set1_epi32(0x7fffffff));
771 return vfloat8(_mm256_and_ps(a.m, msk));
772}
773
774/**
775 * @brief Return a float rounded to the nearest integer value.

Callers

nothing calls this directly

Calls 1

vfloat8Class · 0.70

Tested by

no test coverage detected