MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / floor

Function floor

Source/ThirdParty/basis_universal/encoder/cppspmd_sse.h:1451–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1449}
1450
1451CPPSPMD_FORCE_INLINE vfloat floor(const vfloat& a)
1452{
1453 __m128i abs_a = _mm_and_si128(_mm_castps_si128(a.m_value), _mm_set1_epi32(0x7FFFFFFFU));
1454 __m128i has_fractional = _mm_cmplt_epi32(abs_a, _mm_castps_si128(_mm_set1_ps(8388608.0f)));
1455
1456 __m128i ai = _mm_cvtps_epi32(a.m_value);
1457 __m128 af = _mm_cvtepi32_ps(ai);
1458 __m128 changed = _mm_cvtepi32_ps(_mm_castps_si128(_mm_cmpgt_ps(af, a.m_value)));
1459
1460 af = _mm_add_ps(af, changed);
1461
1462 return vfloat{ blendv_mask_ps(a.m_value, af, _mm_castsi128_ps(has_fractional)) };
1463}
1464
1465CPPSPMD_FORCE_INLINE vfloat ceil(const vfloat& a)
1466{

Callers 15

PxF64 floorMethod · 0.85
imageClass · 0.85
get_floorMethod · 0.85
CPPSPMD_DECLFunction · 0.85
fracFunction · 0.85
FFX_SSSR_AdvanceRayFunction · 0.85
round_nearestFunction · 0.85
round_nearest_nzeroFunction · 0.85
eval_numberMethod · 0.85
CheckDoubleMultipleOfMethod · 0.85
interpolateFunction · 0.85

Calls 1

blendv_mask_psFunction · 0.85

Tested by

no test coverage detected