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

Function npyv_lut16_f64

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

uses vector as indexes into a table that contains 16 elements of float64.

Source from the content-addressed store, hash-verified

742// uses vector as indexes into a table
743// that contains 16 elements of float64.
744NPY_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}
754NPY_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)); }
756NPY_FINLINE npyv_s64 npyv_lut16_s64(const npy_int64 *table, npyv_u64 idx)

Callers 2

npyv_lut16_u64Function · 0.70
npyv_lut16_s64Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected