Commit Graph

8 Commits (4fdbeeebe0f537a903d81046a1efc6a69ddf04bb)

Author SHA1 Message Date
Loic Dachary 4fdbeeebe0 define galois_uninit_field
To free resources allocated by galois_init_default_field.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-03 19:08:44 +02:00
Loic Dachary 1b30a37c9f add galois_init_default_field error code
galois_init_default_field returns an errno(3) code in case of error
instead of exiting. This is handy when the caller needs to perform
cleanup or error reporting when an error occurs instead of exit(2).

The exit(2) based error handling is preserved in the static
galois_init() function which is used in galois.c instead and is based on
galois_init_default_field to avoid code duplication.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-06-08 18:59:00 +02:00
Loic Dachary 5c9577172c make galois_init_default_field(int w) extern
So that the application can initialize gfp_array and gfp_is_composite
instead of relying on initialization happening implicitly when the
multiply or xor functions are called. The init function can be called
once when the application guarantees thread safety. And the multiply and
xor functions can be called from multiple threads without risking races.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-09 00:05:18 +02:00
Loic Dachary d4730bfd7d add missing return value to functions that require it
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-06 01:38:29 +01:00
Jim Plank be40b4e549 Revision 2.0 is ready for prime time! 2014-01-25 10:55:29 -05:00
Kevin Greenan 16838859dc Added code to not use gf-complete mult_by_one if region size is small (less than 16 bytes). 2013-12-27 20:56:16 -08:00
Kevin Greenan c4ab254bbc Do SIMD XOR, where possible! 2013-12-20 08:21:46 -08:00
Kevin Greenan 00a17c0a7a Setup autoconf to work with Jerasure 2013-12-04 23:08:08 -08:00