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

Function npyv_divc_s64

numpy/core/src/common/simd/vec/arithmetic.h:287–292  ·  view source on GitHub ↗

divide each signed 64-bit element by a precomputed divisor (round towards zero)

Source from the content-addressed store, hash-verified

285}
286// divide each signed 64-bit element by a precomputed divisor (round towards zero)
287NPY_FINLINE npyv_s64 npyv_divc_s64(npyv_s64 a, const npyv_s64x3 divisor)
288{
289 npyv_b64 overflow = npyv_and_b64(vec_cmpeq(a, npyv_setall_s64(-1LL << 63)), (npyv_b64)divisor.val[1]);
290 npyv_s64 d = vec_sel(divisor.val[0], npyv_setall_s64(1), overflow);
291 return vec_div(a, d);
292}
293/***************************
294 * Division
295 ***************************/

Callers

nothing calls this directly

Calls 2

npyv_and_b64Function · 0.85
npyv_setall_s64Function · 0.50

Tested by

no test coverage detected