Tuning framework

Niels Möller nisse at lysator.liu.se
Tue Nov 18 16:51:57 CET 2003


I've had a first look at the tuning framework to figure out how to add
tuning for the hgcd function. It's interface is a little more complex
than other mpn functions,

  mp_size_t
  mpn_hgcd_init_itch(mp_size_t size);
  
  void
  mpn_hgcd_init(struct hgcd *hgcd,
  	      mp_size_t asize,
  	      mp_limb_t *limbs);
  
  mp_size_t
  mpn_hgcd_itch(mp_size_t size);
  
  int
  mpn_hgcd(struct hgcd *hgcd,
  	 mp_srcptr ap, mp_size_t asize,
  	 mp_srcptr bp, mp_size_t bsize,
  	 struct qstack *quotients,
  	 mp_ptr tp, mp_size_t talloc);

There's one parameter to tune, HGCD_SCHOENHAGE_THRESHOLD. I think I've
figured out to add the tuning glue glue to gmp-impl.h, but I'm a
little confused about what I'm supposed to add to tune/tuneup.c and
tune/common.c.

/Niels


More information about the gmp-devel mailing list