8000 MAINT, SIMD: Pass divisor by refernce in npyv_divc_* by ganesh-k13 · Pull Request #19114 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT, SIMD: Pass divisor by refernce in npyv_divc_* #19114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Prev Previous commit
SIMD: Reference pass divisor in npyv_divc_* dispatch
  • Loading branch information
ganesh-k13 committed May 27, 2021
commit 76b5da00ec41d5667eaf3488d8be2c8e64a75e62
4 changes: 2 additions & 2 deletions numpy/core/src/umath/loops_arithmetic.dispatch.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ simd_divide_by_scalar_contig_@sfx@(char **args, npy_intp len)
nsign_a = npyv_and_@sfx@(nsign_a, npyv_setall_@sfx@(1));
npyv_@sfx@ diff_sign = npyv_sub_@sfx@(nsign_a, nsign_d);
npyv_@sfx@ to_ninf = npyv_xor_@sfx@(nsign_a, nsign_d);
npyv_@sfx@ trunc = npyv_divc_@sfx@(npyv_add_@sfx@(a, diff_sign), divisor);
npyv_@sfx@ trunc = npyv_divc_@sfx@(npyv_add_@sfx@(a, diff_sign), &divisor);
npyv_@sfx@ floor = npyv_sub_@sfx@(trunc, to_ninf);
npyv_store_@sfx@(dst, floor);
}
Expand Down Expand Up @@ -117,7 +117,7 @@ simd_divide_by_scalar_contig_@sfx@(char **args, npy_intp len)

for (; len >= vstep; len -= vstep, src += vstep, dst += vstep) {
npyv_@sfx@ a = npyv_load_@sfx@(src);
npyv_@sfx@ c = npyv_divc_@sfx@(a, divisor);
npyv_@sfx@ c = npyv_divc_@sfx@(a, &divisor);
npyv_store_@sfx@(dst, c);
}

Expand Down
0