Unused code

Torbjorn Granlund tg at gmplib.org
Sat Apr 14 12:33:19 CEST 2012

Marc Glisse <marc.glisse at inria.fr> writes:

  On Sat, 14 Apr 2012, Torbjorn Granlund wrote:
  > bodrato at mail.dm.unipi.it writes:
  >  Il Ven, 13 Aprile 2012 10:23 am, Torbjorn Granlund ha scritto:
  >  > Are you aware if any more files or functions that are unused?
  >  mpn_invert
  > I think mpn_invert is used via large operand division.
  > And Hydra seems to agree with me.  :-)
  Division seems to use mpn_invertappr, no?
  Hydra probably just sees that we test the function in
  tests/mpn/t-invert.c (it calls it 1000 times, and the function is only
  called 1000 times, so there shouldn't be any other caller).

You're right.  My test "grep -rl 'mpn_invert\b' GMP-SRCDIR" found lots
of matches, but ones that made me think it used where actually comments.

That's an interesting case.  Having an mpn_invert seems to make sense,
perhaps even in a extended documented mpn interface.  Opinions?


More information about the gmp-devel mailing list