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

Function npyv_shr_s64

numpy/core/src/common/simd/sse/operators.h:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#define npyv_shr_s32(A, C) _mm_sra_epi32(A, _mm_cvtsi32_si128(C))
33#define npyv_shr_u64(A, C) _mm_srl_epi64(A, _mm_cvtsi32_si128(C))
34NPY_FINLINE __m128i npyv_shr_s64(__m128i a, int c)
35{
36 const __m128i sbit = npyv_setall_s64(0x8000000000000000);
37 const __m128i cv = _mm_cvtsi32_si128(c);
38 __m128i r = _mm_srl_epi64(_mm_add_epi64(a, sbit), cv);
39 return _mm_sub_epi64(r, _mm_srl_epi64(sbit, cv));
40}
41
42// Right by an immediate constant
43#define npyv_shri_u16 _mm_srli_epi16

Callers

nothing calls this directly

Calls 1

npyv_setall_s64Function · 0.70

Tested by

no test coverage detected