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

Function npyv_loadn2_f32

numpy/core/src/common/simd/avx2/memory.h:101–108  ·  view source on GitHub ↗

/ 64-bit load over 32-bit stride

Source from the content-addressed store, hash-verified

99
100//// 64-bit load over 32-bit stride
101NPY_FINLINE npyv_f32 npyv_loadn2_f32(const float *ptr, npy_intp stride)
102{
103 __m128d a0 = _mm_castsi128_pd(_mm_loadl_epi64((const __m128i*)ptr));
104 __m128d a2 = _mm_castsi128_pd(_mm_loadl_epi64((const __m128i*)(ptr + stride*2)));
105 __m128d a01 = _mm_loadh_pd(a0, (const double*)(ptr + stride));
106 __m128d a23 = _mm_loadh_pd(a2, (const double*)(ptr + stride*3));
107 return _mm256_castpd_ps(_mm256_insertf128_pd(_mm256_castpd128_pd256(a01), a23, 1));
108}
109NPY_FINLINE npyv_u32 npyv_loadn2_u32(const npy_uint32 *ptr, npy_intp stride)
110{ return _mm256_castps_si256(npyv_loadn2_f32((const float*)ptr, stride)); }
111NPY_FINLINE npyv_s32 npyv_loadn2_s32(const npy_int32 *ptr, npy_intp stride)

Callers 2

npyv_loadn2_u32Function · 0.70
npyv_loadn2_s32Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected