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

Function npyv_loadn2_till_s32

numpy/core/src/common/simd/sse/memory.h:405–421  ·  view source on GitHub ↗

/ 64-bit load over 32-bit stride

Source from the content-addressed store, hash-verified

403
404//// 64-bit load over 32-bit stride
405NPY_FINLINE npyv_s32 npyv_loadn2_till_s32(const npy_int32 *ptr, npy_intp stride, npy_uintp nlane,
406 npy_int32 fill_lo, npy_int32 fill_hi)
407{
408 assert(nlane > 0);
409 if (nlane == 1) {
410 const __m128i vfill = npyv_set_s32(0, 0, fill_lo, fill_hi);
411 __m128i a = _mm_castpd_si128(
412 _mm_loadl_pd(_mm_castsi128_pd(vfill), (double*)ptr)
413 );
414 #if NPY_SIMD_GUARD_PARTIAL_LOAD
415 volatile __m128i workaround = a;
416 a = _mm_or_si128(workaround, a);
417 #endif
418 return a;
419 }
420 return npyv_loadn2_s32(ptr, stride);
421}
422NPY_FINLINE npyv_s32 npyv_loadn2_tillz_s32(const npy_int32 *ptr, npy_intp stride, npy_uintp nlane)
423{
424 assert(nlane > 0);

Callers

nothing calls this directly

Calls 1

npyv_loadn2_s32Function · 0.70

Tested by

no test coverage detected