Bill Allombert on Mon, 13 Jan 2014 22:00:38 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: new FFM_mul (and FlxqM_mul, FqM_mul, ...)


On Mon, Jan 13, 2014 at 05:38:48PM +0100, Bill Allombert wrote:
> > One thing I'm not sure about is how much consistency checking to do in
> > the lower-level functions (FlxqM_FlxqC_mul, etc.); currently they check
> > if the dimensions are compatible but not if the input types (t_MAT etc.)
> > are correct.
> 
> Yes, a function FlxqM_xxx must assume the input is actually a FlxqM.
> 
> I wonder if it would be worthwhile to implement gen_matmut()/gen_matcolmut()
> in term of the bb_field interface and uses it instead of duplicating the code.

What I meant was to add a function gen_matmul() similar to gen_ker():

GEN
gen_matmul(GEN x, GEN y, void *E, const struct bb_field *ff)
{
  ...
}
And define

FlxqM_mul(GEN x, GEN y, GEN T, ulong p)
{
  void *E;
  const struct bb_field *ff=get_Flxq_field(&E,T,p);
  return gen_matmul(x,y, E, ff);
}

Relatedly, I have created a branch bill-FpM_powu, which
adds the functions FpM_powu, Flm_powu, F2m_pow.

Cheers,
Bill.