/ 64-bit nlane
| 250 | |
| 251 | //// 64-bit nlane |
| 252 | NPY_FINLINE npyv_s32 npyv_load2_till_s32(const npy_int32 *ptr, npy_uintp nlane, |
| 253 | npy_int32 fill_lo, npy_int32 fill_hi) |
| 254 | { |
| 255 | assert(nlane > 0); |
| 256 | const __m256i vfill = npyv_set_s32( |
| 257 | fill_lo, fill_hi, fill_lo, fill_hi, |
| 258 | fill_lo, fill_hi, fill_lo, fill_hi |
| 259 | ); |
| 260 | const __m256i steps = npyv_set_s64(0, 1, 2, 3); |
| 261 | __m256i vnlane = npyv_setall_s64(nlane > 4 ? 4 : (int)nlane); |
| 262 | __m256i mask = _mm256_cmpgt_epi64(vnlane, steps); |
| 263 | __m256i payload = _mm256_maskload_epi64((const long long*)ptr, mask); |
| 264 | __m256i ret = _mm256_blendv_epi8(vfill, payload, mask); |
| 265 | #if NPY_SIMD_GUARD_PARTIAL_LOAD |
| 266 | volatile __m256i workaround = ret; |
| 267 | ret = _mm256_or_si256(workaround, ret); |
| 268 | #endif |
| 269 | return ret; |
| 270 | } |
| 271 | // fill zero to rest lanes |
| 272 | NPY_FINLINE npyv_s32 npyv_load2_tillz_s32(const npy_int32 *ptr, npy_uintp nlane) |
| 273 | { return npyv_load_tillz_s64((const npy_int64*)ptr, nlane); } |
nothing calls this directly
no test coverage detected