GMP 5.1.1: Valgrind reports incorrect read in __gmpn_copyd (called from __gmpz_mul_2exp)

Niels Möller nisse at lysator.liu.se
Mon Mar 4 19:34:16 CET 2013


Alexander Kruppa <akruppa at gmail.com> writes:

> Maybe GMP could have configure look for a function to align limb
> arrays at multiples of 16 (or higher) on systems where SIMD wants to
> operate on aligned data, to avoid a speed penalty from working on
> partial data at loop start.

That won't quite work, unless you go all the way and define a "limb" as
a 128-bit quantity. Internal code passes around lots of pointers into
the middle of the limb arrays. In particular various divide-and-conquer
algorithms and the Toom multiply functions do that all the time.

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-bugs mailing list