* Non-contiguous partial load *********************************/ / 32
| 303 | *********************************/ |
| 304 | //// 32 |
| 305 | NPY_FINLINE npyv_s32 |
| 306 | npyv_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 |
| 328 | NPY_FINLINE npyv_s32 |
| 329 | npyv_loadn_tillz_s32(const npy_int32 *ptr, npy_intp stride, npy_uintp nlane) |
no test coverage detected