uses vector as indexes into a table that contains 16 elements of float64.
| 742 | // uses vector as indexes into a table |
| 743 | // that contains 16 elements of float64. |
| 744 | NPY_FINLINE npyv_f64 npyv_lut16_f64(const double *table, npyv_u64 idx) |
| 745 | { |
| 746 | const int i0 = _mm_cvtsi128_si32(idx); |
| 747 | #ifdef NPY_HAVE_SSE41 |
| 748 | const int i1 = _mm_extract_epi32(idx, 2); |
| 749 | #else |
| 750 | const int i1 = _mm_extract_epi16(idx, 4); |
| 751 | #endif |
| 752 | return npyv_set_f64(table[i0], table[i1]); |
| 753 | } |
| 754 | NPY_FINLINE npyv_u64 npyv_lut16_u64(const npy_uint64 *table, npyv_u64 idx) |
| 755 | { return npyv_reinterpret_u64_f64(npyv_lut16_f64((const double*)table, idx)); } |
| 756 | NPY_FINLINE npyv_s64 npyv_lut16_s64(const npy_int64 *table, npyv_u64 idx) |
no outgoing calls
no test coverage detected