MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / v_is_not_finite

Function v_is_not_finite

include/vecmath/dag_vecMath_common.h:363–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361// Note: intentionally not const since some compliers (e.g. clang>=19) optimizes it off otherwise
362alignas(16) inline volatile int __infMask[4] = {0x7F800000, 0x7F800000, 0x7F800000, 0x7F800000};
363VECTORCALL VECMATH_FINLINE vec4f v_is_not_finite(vec4f a)
364{
365 vec4i ai = v_cast_vec4i(a);
366 vec4i im = v_ldi((int *)__infMask);
367 return v_cast_vec4f(v_cmp_eqi(v_andi(ai, im), im));
368}
369VECTORCALL VECMATH_FINLINE vec4f v_is_finite(vec4f a) { return v_not(v_is_not_finite(a)); }
370VECTORCALL VECMATH_FINLINE vec4f v_is_neg(vec4f a) { return v_cast_vec4f(v_srai(v_cast_vec4i(a), 31)); }
371VECTORCALL VECMATH_FINLINE bool v_test_xyzw_nan(vec4f a) { return v_test_any_bit_set(v_is_nan(a)); }

Callers 6

v_remove_not_finiteFunction · 0.85
v_is_finiteFunction · 0.85
v_test_xyzw_finiteFunction · 0.85
v_test_xyz_finiteFunction · 0.85
v_test_xy_finiteFunction · 0.85
v_test_x_finiteFunction · 0.85

Calls 5

v_cast_vec4iFunction · 0.70
v_ldiFunction · 0.70
v_cast_vec4fFunction · 0.70
v_cmp_eqiFunction · 0.70
v_andiFunction · 0.70

Tested by

no test coverage detected