givaro icon indicating copy to clipboard operation
givaro copied to clipboard

Remove RecInt::rmint

Open Breush opened this issue 5 years ago • 2 comments

Rationale is that:

  • Basically, rmint<K> is a Modular<ruint<K>,ruint<K+1>>, and should behave similarly (if they don't, we should specilized the Modular one);
  • There are two variants rmint<K, MG_INACTIVE> and rmint<K, MG_ACTIVE> that have underlying montgomery variant active or not. The second one should be equal to Montgomery<ruint<K>>, with specialization if needed for performances;
  • rmint<K> are storing modules as static static ruint<K> p which means that you cannot have two rmints with different modules at the same time (!);
  • rmint are breaking the current design of Givaro by having no Field class.

Breush avatar Sep 06 '18 09:09 Breush

I think the last 2 points are strong enough to motivate this change. I kind of remember discussing this with @jgdumas who had a good argument for the existence of this design. Let's wait for his feedback.

ClementPernet avatar Sep 13 '18 17:09 ClementPernet

rmint could be replaced by StaticElement<Modular<ruint>>, so seems good to go.

jgdumas avatar Dec 12 '18 08:12 jgdumas