tune&fat: run-time vs. compile-time constant thresholds

Torbjorn Granlund tg at gmplib.org
Mon May 14 08:57:27 CEST 2012

bodrato at mail.dm.unipi.it writes:

  Toom-2 and Toom-3 code for fat builds should be basically equivalent to
  the code used by tuneup, now: the thresholds are global variables, and
  threshold checking consist in a single comparison.
  We may extend the mechanism to other toom thresholds now...

  Current code assume that cpuvec was initialized before calling toom, i.e.
  toom code must be called after checking at least a threshold. It should be
  a reasonable assumption, but I still have to check if the tune/speed
  program behaves correctly.
I don't think we need to properly support direct calls to undocumented
functions.  But in a fat build, we could nevertheless set the various
thresholds to consistent values, at compile time.

Of course speed (which makes sense for fat) and tuneup (which does not)
makes such calls.  But here we could make an undocumented call to some
initialisation function.  :-)


More information about the gmp-devel mailing list