MCPcopy Create free account
hub / github.com/numpy/numpy / npyv_maxp_f32

Function npyv_maxp_f32

numpy/core/src/common/simd/sse/math.h:46–51  ·  view source on GitHub ↗

Maximum, supports IEEE floating-point arithmetic (IEC 60559), - If one of the two vectors contains NaN, the equivalent element of the other vector is set - Only if both corresponded elements are NaN, NaN is set.

Source from the content-addressed store, hash-verified

44// - If one of the two vectors contains NaN, the equivalent element of the other vector is set
45// - Only if both corresponded elements are NaN, NaN is set.
46NPY_FINLINE npyv_f32 npyv_maxp_f32(npyv_f32 a, npyv_f32 b)
47{
48 __m128i nn = npyv_notnan_f32(b);
49 __m128 max = _mm_max_ps(a, b);
50 return npyv_select_f32(nn, max, a);
51}
52NPY_FINLINE npyv_f64 npyv_maxp_f64(npyv_f64 a, npyv_f64 b)
53{
54 __m128i nn = npyv_notnan_f64(b);

Callers

nothing calls this directly

Calls 2

npyv_select_f32Function · 0.85
npyv_notnan_f32Function · 0.70

Tested by

no test coverage detected