div_qr_1 interface

Niels Möller nisse at lysator.liu.se
Sun Oct 20 08:30:42 CEST 2013


Torbjorn Granlund <tg at gmplib.org> writes:

> I think x86-64, x86-32, arm32, arm64, powerpc-64, sparc-64 matter.
> Unfortunately, powerpc-64 (and -32) return these types onto the stack
> via an implicit pointer.

Ok, I think I'll stick to using a separate pointer for qh then. Storing qh
early may also have the advantage of allowing more tail calls.

I'm about to push the first step, with C implementations of mpn_div_qr_1
and mpn_div_qr_1n_pi1.

The C code implements two variants of mpn_div_qr_1n_pi1: First is a
plain loop around udiv_qrnnd_preinv, second uses the new method.

We'd need support in tuneup to select the best variant. And also support
for tuning the DIV_QR_1_ thresholds.

I wrote:

>   In principle, since these are internal functions,

I was a bit confused here. mpn_div_qr_1 is intended as a public
function.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list