MCPcopy Create free account
hub / github.com/OSGeo/gdal / XMMLoad4Values

Function XMMLoad4Values

alg/gdalwarpkernel.cpp:3351–3365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3349/************************************************************************/
3350
3351static CPL_INLINE __m128 XMMLoad4Values(const GByte *ptr)
3352{
3353 unsigned int i;
3354 memcpy(&i, ptr, 4);
3355 __m128i xmm_i = _mm_cvtsi32_si128(i);
3356 // Zero extend 4 packed unsigned 8-bit integers in a to packed
3357 // 32-bit integers.
3358#if defined(__SSE4_1__) || defined(__AVX__) || defined(USE_NEON_OPTIMIZATIONS)
3359 xmm_i = _mm_cvtepu8_epi32(xmm_i);
3360#else
3361 xmm_i = _mm_unpacklo_epi8(xmm_i, _mm_setzero_si128());
3362 xmm_i = _mm_unpacklo_epi16(xmm_i, _mm_setzero_si128());
3363#endif
3364 return _mm_cvtepi32_ps(xmm_i);
3365}
3366
3367static CPL_INLINE __m128 XMMLoad4Values(const GUInt16 *ptr)
3368{

Calls 8

_mm_cvtsi32_si128Function · 0.85
_mm_cvtepu8_epi32Function · 0.85
_mm_unpacklo_epi8Function · 0.85
_mm_setzero_si128Function · 0.85
_mm_unpacklo_epi16Function · 0.85
_mm_cvtepi32_psFunction · 0.85
_mm_cvtsi64_si128Function · 0.85
_mm_cvtepu16_epi32Function · 0.85

Tested by

no test coverage detected