Commit be40b4e549353c42a32803652fa707a1e930dd1c

Authored by Jim Plank
1 parent 7a502868
Exists in master and in 1 other branch v2

Revision 2.0 is ready for prime time!

Examples/cauchy_01.c
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdint.h>
... ...
Examples/cauchy_02.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,10 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -/*
41   - revised by S. Simmerman 2/25/08
42   - Re-revised by JSP to use GF-Complete - 1/2014
43   -*/
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
  46 +
44 47 #include <stdio.h>
45 48 #include <stdlib.h>
46 49 #include <stdint.h>
... ...
Examples/cauchy_03.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,10 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -/*
41   - revised by S. Simmerman 2/25/08
42   - Re-revised by JSP to use GF-Complete - 1/2014
43   -*/
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
  46 +
44 47 #include <stdio.h>
45 48 #include <stdlib.h>
46 49 #include <stdint.h>
... ...
Examples/cauchy_04.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,10 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -/*
41   - revised by S. Simmerman 2/25/08
42   - Re-revised by JSP to use GF-Complete - 1/2014
43   -*/
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
44 47 #include <stdio.h>
45 48 #include <stdlib.h>
46 49 #include <stdint.h>
... ...
Examples/decoder.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
40 46  
41 47 /*
42 48 This program takes as input an inputfile, k, m, a coding
... ...
Examples/encoder.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
40 46  
41 47 /*
42 48  
... ... @@ -47,8 +53,8 @@ the original file and m of the files are encoded based on
47 53 the given coding technique. The format of the created files
48 54 is the file name with "_k#" or "_m#" and then the extension.
49 55 (For example, inputfile test.txt would yield file "test_k1.txt".)
  56 +*/
50 57  
51   - */
52 58 #include <sys/time.h>
53 59 #include <sys/stat.h>
54 60 #include <string.h>
... ...
Examples/jerasure_01.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,7 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
40 41  
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42 47 #include <stdio.h>
43 48 #include <stdlib.h>
... ...
Examples/jerasure_02.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
Examples/jerasure_03.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,7 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42 47 #include <stdio.h>
43 48 #include <stdlib.h>
... ...
Examples/jerasure_04.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,7 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
43 49 #include <string.h>
... ...
Examples/jerasure_05.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,12 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42   -/*
43   - revised by S. Simmerman
44   - 2/25/08
45   -*/
46 47 #include <stdint.h>
47 48 #include <stdio.h>
48 49 #include <stdlib.h>
... ...
Examples/jerasure_06.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,11 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
41   -/*
42   - revised by S. Simmerman
43   - 2/25/08
44   -*/
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
45 47 #include <stdio.h>
46 48 #include <stdlib.h>
47 49 #include <stdint.h>
... ...
Examples/jerasure_07.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,12 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42   -/*
43   - revised by S. Simmerman
44   - 2/25/08
45   -*/
46 47 #include <stdio.h>
47 48 #include <stdlib.h>
48 49 #include <string.h>
... ...
Examples/jerasure_08.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,7 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
41 47 #include <stdio.h>
42 48 #include <string.h>
43 49 #include <stdlib.h>
... ...
Examples/liberation_01.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,12 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42   -/*
43   - revised by S. Simmerman
44   - 2/25/08
45   -*/
46 47 #include <stdio.h>
47 48 #include <stdlib.h>
48 49 #include <string.h>
... ...
Examples/reed_sol_01.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,8 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
40 41  
41   -/* Part of this code was revised by Scott Simmerman 2/25/08 */
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
42 46  
43 47 #include <stdio.h>
44 48 #include <stdlib.h>
... ...
Examples/reed_sol_02.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
40 47 #include <stdio.h>
41 48 #include <stdlib.h>
42 49 #include <string.h>
... ...
Examples/reed_sol_03.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,12 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
40 41  
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
41 46  
42   -/*
43   - revised by S. Simmerman
44   - 2/25/08
45   -*/
46 47 #include <stdio.h>
47 48 #include <stdlib.h>
48 49 #include <string.h>
... ...
Examples/reed_sol_04.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
Examples/reed_sol_test_gf.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,7 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
40   -
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
43 49 #include <string.h>
... ...
Examples/reed_sol_time_gf.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,13 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank.
  45 + */
  46 +
40 47 #include <stdio.h>
41 48 #include <stdlib.h>
42 49 #include <string.h>
... ...
README
... ... @@ -7,13 +7,12 @@ External Documentation:
7 7  
8 8 See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
9 9  
10   -See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
11   -on GF-Complete and the tarball needed to install it.
12   -
13   -Custom usgae of GF-Complete is explained in this file (see below).
  10 +See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
14 11  
15 12 NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
16 13  
  14 +Custom usage of GF-Complete is explained in this file (see below).
  15 +
17 16 There are two directories of source code:
18 17  
19 18 The src directory contains the jerasure code.
... ...
README.nd
1 1 This is revision 2.0 of Jerasure. This is pretty much Jerasure 1.2 without the
2   -original Galois Field backend. Version 2.0 links directly to GF-Complete.
  2 +original Galois Field backend. Version 2.0 links directly to GF-Complete, which
  3 +is more flexible than the original, and *much* faster, because it leverages SIMD
  4 +instructions.
3 5  
4 6 External Documentation:
5 7  
6 8 See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
7 9  
8   -See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
9   -on GF-Complete and the tarball needed to install it.
10   -
11   -Custom usgae of GF-Complete is explained in this file (see below).
  10 +See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
12 11  
13 12 NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
14 13  
15   -There are two directories:
  14 +Custom usage of GF-Complete is explained in this file (see below).
16 15  
17   -The src directory contains the jerasure code.
  16 +There are two directories of source code:
18 17  
  18 +The src directory contains the jerasure code.
19 19 The Examples directory contains the example programs.
20 20  
21 21 The makefile assumes that Examples is a subdirectory of the home directory.
... ... @@ -33,7 +33,7 @@ Installing:
33 33 This will install the examples under PREFIX/bin, the library under PREFIX/lib
34 34 and the header files under PREFIX/include
35 35  
36   -See individual source file to determine what the examples do.
  36 +See individual source files to determine what the examples do.
37 37  
38 38 Inclusion of GF-Complete:
39 39  
... ... @@ -44,8 +44,8 @@ determine the default field to use, if one is not specified.
44 44 If you would like to explore a using a different Galois Field implementation,
45 45 you can dynamically set the backend GF for a given word-size (w).
46 46  
47   -The new galois.[ch] exports the following functions to be used by applications
48   -for dynamically setting the backend GF:
  47 +The new galois.c and galois.h export the following functions to be used by applications
  48 +for dynamically setting the back-end GF:
49 49  
50 50 1.) galois_change_technique
51 51  
... ... @@ -53,21 +53,25 @@ for dynamically setting the backend GF:
53 53  
54 54 void galois_change_technique(gf_t *gf, int w);
55 55  
  56 + This is the recommended way for you to change techniques.
  57 +
56 58 This function will take a pointer to a Galois field structure and set it as the
57 59 current backend for all operations in GF(2^w). Note that you must specify 'w'
58 60 here, since the internal GF structure is mostly opaque to Jerasure. Be sure to
59 61 change the technique with the correct structure and word-size.
60 62  
61   - There are a few ways to get a pointer to a gf_t structure: via GF-Complete or
62   - using the helper functions provided by Jerasure: galois_init_field and
63   - galois_init_composite_field.
  63 + There are a few ways to get a pointer to a gf_t structure: GF-Complete gives three
  64 + primitives for this -- create_gf_from_argv(), gf_init_easy() and gf_init_hard().
  65 + Please read the documentation on GF-Complete for how these work. By far, the
  66 + most powerful and easy is create_gf_from_argv(), which parses an argv-style
  67 + string. Otherwise, the most flexible is gf_init_hard().
64 68  
65   - GF-Complete exposes create_gf_from_argv, gf_init_easy and gf_init_hard. See
66   - the GF-Complete documentation for more detail on how to use those functions.
67   - You can definitely create more complicated fields with the GF-Complete
68   - initialization functions, but the two helper functions provided by Jerasure
69   - (galois_init_field and galois_init_composite_field) can be used to create most
70   - of the supported Galois Fields.
  69 + In galois.c/galois.h, we have defined galois_init_field(), which is pretty much
  70 + identical to gf_init_hard(), except it performs memory allocation with malloc(),
  71 + and galois_init_composite_field(), which facilitates creating composite fields.
  72 +
  73 + These are described below, but once again, we recommend using create_gf_from_argv()
  74 + or gf_init_hard() if you want to change your Galois field.
71 75  
72 76 2.) galois_init_field
73 77  
... ... @@ -149,10 +153,6 @@ For more information on how to change the backing fields for Jerasure, please re
149 153 2.) Examples/reed_sol_time_gf.c: Runs more thorough timing and validation tests
150 154 for a backing GF (uses create_gf_from_argv to get gf_t pointer)
151 155  
152   - 3.) Examples/reed_sol_hard_time_gf.c: Runs more thorough timing and validation tests
153   - for a backing GF (uses galois_init_field and galois_init_composite_field to get gf_t
154   - pointer)
155   -
156 156 Performance:
157 157  
158 158 There are two performance-based test scripts: time_all_gfs_argv_init.sh and
... ... @@ -174,3 +174,4 @@ the test run of
174 174 is recorded as this in PERF.txt:
175 175  
176 176 _12_3_8_128_65536_-m_SPLIT_8_4_-r_SSE_- 2813.34
  177 +
... ...
README.txt
... ... @@ -7,13 +7,12 @@ External Documentation:
7 7  
8 8 See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
9 9  
10   -See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
11   -on GF-Complete and the tarball needed to install it.
12   -
13   -Custom usgae of GF-Complete is explained in this file (see below).
  10 +See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
14 11  
15 12 NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
16 13  
  14 +Custom usage of GF-Complete is explained in this file (see below).
  15 +
17 16 There are two directories of source code:
18 17  
19 18 The src directory contains the jerasure code.
... ...
src/cauchy.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
src/cauchy_best_r6.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
src/galois.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
src/jerasure.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
src/liberation.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,6 +37,12 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
... ...
src/reed_sol.c
1 1 /* *
2   - * Copyright (c) 2013, James S. Plank and Kevin Greenan
  2 + * Copyright (c) 2014, James S. Plank and Kevin Greenan
3 3 * All rights reserved.
4 4 *
5 5 * Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
... ... @@ -37,11 +37,18 @@
37 37 * POSSIBILITY OF SUCH DAMAGE.
38 38 */
39 39  
  40 +/* Jerasure's authors:
  41 +
  42 + Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
  43 + Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
  44 + Revision 1.0 - 2007: James S. Plank
  45 + */
40 46  
41 47 #include <stdio.h>
42 48 #include <stdlib.h>
43 49 #include <string.h>
44 50  
  51 +#include <gf_complete.h>
45 52 #include "galois.h"
46 53 #include "jerasure.h"
47 54 #include "reed_sol.h"
... ... @@ -91,118 +98,52 @@ int *reed_sol_vandermonde_coding_matrix(int k, int m, int w)
91 98 return dist;
92 99 }
93 100  
94   -static int prim32 = -1;
95   -
96   -#define rgw32_mask(v) ((v) & 0x80000000)
97   -
98   -void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
99   -{
100   - int *l1;
101   - int *ltop;
102   - char *ctop;
103   -
104   - if (prim32 == -1) prim32 = galois_single_multiply((1 << 31), 2, 32);
105   -
106   - ctop = region + nbytes;
107   - ltop = (int *) ctop;
108   - l1 = (int *) region;
109   -
110   - while (l1 < ltop) {
111   - *l1 = ((*l1) << 1) ^ ((*l1 & 0x80000000) ? prim32 : 0);
112   - l1++;
113   - }
114   -}
115   -
116 101 static int prim08 = -1;
117   -static int mask08_1 = -1;
118   -static int mask08_2 = -1;
  102 +static gf_t GF08;
119 103  
120 104 void reed_sol_galois_w08_region_multby_2(char *region, int nbytes)
121 105 {
122   - unsigned int *l1;
123   - unsigned int *ltop;
124   - char *ctop;
125   - unsigned int tmp, tmp2;
126   -
127   -
128 106 if (prim08 == -1) {
129   - tmp = galois_single_multiply((1 << 7), 2, 8);
130   - prim08 = 0;
131   - while (tmp != 0) {
132   - prim08 |= tmp;
133   - tmp = (tmp << 8);
134   - }
135   - tmp = (1 << 8) - 2;
136   - mask08_1 = 0;
137   - while (tmp != 0) {
138   - mask08_1 |= tmp;
139   - tmp = (tmp << 8);
140   - }
141   - tmp = (1 << 7);
142   - mask08_2 = 0;
143   - while (tmp != 0) {
144   - mask08_2 |= tmp;
145   - tmp = (tmp << 8);
  107 + prim08 = galois_single_multiply((1 << 7), 2, 8);
  108 + if (!gf_init_hard(&GF08, 8, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
  109 + prim08, 0, 0, NULL, NULL)) {
  110 + fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w08_region_multby_2\n");
  111 + exit(1);
146 112 }
147 113 }
148   -
149   - ctop = region + nbytes;
150   - ltop = (unsigned int *) ctop;
151   - l1 = (unsigned int *) region;
152   -
153   - while (l1 < ltop) {
154   - tmp = ((*l1) << 1) & mask08_1;
155   - tmp2 = (*l1) & mask08_2;
156   - tmp2 = ((tmp2 << 1) - (tmp2 >> 7));
157   - *l1 = (tmp ^ (tmp2 & prim08));
158   - l1++;
159   - }
  114 + GF08.multiply_region.w32(&GF08, region, region, 2, nbytes, 0);
160 115 }
161 116  
162 117 static int prim16 = -1;
163   -static int mask16_1 = -1;
164   -static int mask16_2 = -1;
  118 +static gf_t GF16;
165 119  
166 120 void reed_sol_galois_w16_region_multby_2(char *region, int nbytes)
167 121 {
168   - unsigned int *l1;
169   - unsigned int *ltop;
170   - char *ctop;
171   - unsigned int tmp, tmp2;
172   -
173   -
174 122 if (prim16 == -1) {
175   - tmp = galois_single_multiply((1 << 15), 2, 16);
176   - prim16 = 0;
177   - while (tmp != 0) {
178   - prim16 |= tmp;
179   - tmp = (tmp << 16);
180   - }
181   - tmp = (1 << 16) - 2;
182   - mask16_1 = 0;
183   - while (tmp != 0) {
184   - mask16_1 |= tmp;
185   - tmp = (tmp << 16);
186   - }
187   - tmp = (1 << 15);
188   - mask16_2 = 0;
189   - while (tmp != 0) {
190   - mask16_2 |= tmp;
191   - tmp = (tmp << 16);
  123 + prim16 = galois_single_multiply((1 << 15), 2, 16);
  124 + if (!gf_init_hard(&GF16, 16, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
  125 + prim16, 0, 0, NULL, NULL)) {
  126 + fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w16_region_multby_2\n");
  127 + exit(1);
192 128 }
193 129 }
  130 + GF16.multiply_region.w32(&GF16, region, region, 2, nbytes, 0);
  131 +}
194 132  
195   - ctop = region + nbytes;
196   - ltop = (unsigned int *) ctop;
197   - l1 = (unsigned int *) region;
  133 +static int prim32 = -1;
  134 +static gf_t GF32;
198 135  
199   - while (l1 < ltop) {
200   - tmp = ((*l1) << 1) & mask16_1;
201   - tmp2 = (*l1) & mask16_2;
202   - tmp2 = ((tmp2 << 1) - (tmp2 >> 15));
203   - *l1 = (tmp ^ (tmp2 & prim16));
204   - l1++;
  136 +void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
  137 +{
  138 + if (prim32 == -1) {
  139 + prim32 = galois_single_multiply((1 << 31), 2, 32);
  140 + if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
  141 + prim32, 0, 0, NULL, NULL)) {
  142 + fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n");
  143 + exit(1);
  144 + }
205 145 }
  146 + GF32.multiply_region.w32(&GF32, region, region, 2, nbytes, 0);
206 147 }
207 148  
208 149 int reed_sol_r6_encode(int k, int w, char **data_ptrs, char **coding_ptrs, int size)
... ...