Bruin, Pieter on Mon, 13 Jan 2014 22:28:44 +0100


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

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


Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:

>> 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);
> }

The more I think about it, the more I actually prefer this approach to
the code duplication in my patch, so if you want to do it in this way,
I'll certainly be happy with that.

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

That looks good, and I guess it will be very easy to add those functions
for non-prime finite fields, too...

Peter