From: mockturtle <framefritti@gmail.com>
Subject: Re: Galois fields
Date: Sun, 22 Sep 2013 02:43:13 -0700 (PDT)
Date: 2013-09-22T02:43:13-07:00 [thread overview]
Message-ID: <6bcff8e8-ca68-4ce4-95e6-387a65930744@googlegroups.com> (raw)
In-Reply-To: <e0a73758-1dfc-448d-9d45-1f1ea7ad5e87@googlegroups.com>
On Saturday, September 21, 2013 5:50:28 PM UTC+2, karh...@gmail.com wrote:
> Are Galois Fields (I only need binary GFs) supported by any publicly available Ada library?
>
>
>
> Thanks
I have a GF binary library that I wrote for myself in my early Ada days. It is a generic package that you must instantiate with the desired GF size (up to 2^64, so it fits in a 64-bit integer).
Unfortunately I did not publish the code by itself, but you can find it "embedded" in an old (and, alas, sleeping) project of mine hosted on launchpad. Just go here
http://bazaar.launchpad.net/~riccardo-bernardini/+junk/pre-ppetp/files/head:/src/lib/Algebra/Galois/
(or here: http://bit.ly/1gOe996 if the URL above is too long) and take the two files gf_2p_varsize.{ads, adb}. You just need to instantiate it with something like
package GF32 is
new Gf_2p_Varsize(Exponent => 32,
Basic_Type => Unsigned_32);
and then use it like
X, Y, Z : GF32.Galois;
X = Y * Z;
Disclaimer: As I said, I wrote this package in my early Ada days, so maybe it is not the most elegant code around, but it works...
Should you decide to use it and have any question, please ask.
Riccardo
prev parent reply other threads:[~2013-09-22 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 15:50 Galois fields karhof21
2013-09-21 18:50 ` Niklas Holsti
2013-09-22 9:43 ` mockturtle [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox