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

Function npyv_loadn_u32

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

* Non-contiguous Load ***************************/ / 32

Source from the content-addressed store, hash-verified

73 ***************************/
74//// 32
75NPY_FINLINE npyv_u32 npyv_loadn_u32(const npy_uint32 *ptr, npy_intp stride)
76{
77 assert(llabs(stride) <= NPY_SIMD_MAXLOAD_STRIDE32);
78 const __m256i steps = _mm256_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7);
79 const __m256i idx = _mm256_mullo_epi32(_mm256_set1_epi32((int)stride), steps);
80 return _mm256_i32gather_epi32((const int*)ptr, idx, 4);
81}
82NPY_FINLINE npyv_s32 npyv_loadn_s32(const npy_int32 *ptr, npy_intp stride)
83{ return npyv_loadn_u32((const npy_uint32*)ptr, stride); }
84NPY_FINLINE npyv_f32 npyv_loadn_f32(const float *ptr, npy_intp stride)

Callers 2

npyv_loadn_s32Function · 0.70
npyv_loadn_f32Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected