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

Function npyv_loadn_till_s32

numpy/core/src/common/simd/vec/memory.h:305–326  ·  view source on GitHub ↗

* Non-contiguous partial load *********************************/ / 32

Source from the content-addressed store, hash-verified

303 *********************************/
304//// 32
305NPY_FINLINE npyv_s32
306npyv_loadn_till_s32(const npy_int32 *ptr, npy_intp stride, npy_uintp nlane, npy_int32 fill)
307{
308 assert(nlane > 0);
309 npyv_s32 vfill = npyv_setall_s32(fill);
310 switch(nlane) {
311 case 3:
312 vfill = vec_insert(ptr[stride*2], vfill, 2);
313 case 2:
314 vfill = vec_insert(ptr[stride], vfill, 1);
315 case 1:
316 vfill = vec_insert(*ptr, vfill, 0);
317 break;
318 default:
319 return npyv_loadn_s32(ptr, stride);
320 } // switch
321#if NPY_SIMD_GUARD_PARTIAL_LOAD
322 volatile npyv_s32 workaround = vfill;
323 vfill = vec_or(workaround, vfill);
324#endif
325 return vfill;
326}
327// fill zero to rest lanes
328NPY_FINLINE npyv_s32
329npyv_loadn_tillz_s32(const npy_int32 *ptr, npy_intp stride, npy_uintp nlane)

Callers 1

npyv_loadn_tillz_s32Function · 0.70

Calls 1

npyv_loadn_s32Function · 0.70

Tested by

no test coverage detected