summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Plank <plank@cs.utk.edu>2014-01-25 10:55:29 -0500
committerJim Plank <plank@cs.utk.edu>2014-01-25 10:55:29 -0500
commitbe40b4e549353c42a32803652fa707a1e930dd1c (patch)
tree3e3e982fcf375c9a7cc12523a5966ce1267e5302
parent7a502868f1fb77faa6667f13b7cc1fb42acb1186 (diff)
downloadjerasure-be40b4e549353c42a32803652fa707a1e930dd1c.tar.gz
Revision 2.0 is ready for prime time!
-rw-r--r--Examples/cauchy_01.c6
-rw-r--r--Examples/cauchy_02.c13
-rw-r--r--Examples/cauchy_03.c13
-rw-r--r--Examples/cauchy_04.c13
-rw-r--r--Examples/decoder.c8
-rw-r--r--Examples/encoder.c10
-rw-r--r--Examples/jerasure_01.c7
-rw-r--r--Examples/jerasure_02.c8
-rw-r--r--Examples/jerasure_03.c9
-rw-r--r--Examples/jerasure_04.c10
-rw-r--r--Examples/jerasure_05.c13
-rw-r--r--Examples/jerasure_06.c14
-rw-r--r--Examples/jerasure_07.c13
-rw-r--r--Examples/jerasure_08.c10
-rw-r--r--Examples/liberation_01.c13
-rw-r--r--Examples/reed_sol_01.c8
-rw-r--r--Examples/reed_sol_02.c9
-rw-r--r--Examples/reed_sol_03.c11
-rw-r--r--Examples/reed_sol_04.c8
-rw-r--r--Examples/reed_sol_test_gf.c10
-rw-r--r--Examples/reed_sol_time_gf.c9
-rw-r--r--README7
-rw-r--r--README.nd47
-rw-r--r--README.txt7
-rw-r--r--src/cauchy.c8
-rw-r--r--src/cauchy_best_r6.c8
-rw-r--r--src/galois.c8
-rw-r--r--src/jerasure.c8
-rw-r--r--src/liberation.c8
-rw-r--r--src/reed_sol.c129
30 files changed, 253 insertions, 192 deletions
diff --git a/Examples/cauchy_01.c b/Examples/cauchy_01.c
index 5ffc16f..870ea12 100644
--- a/Examples/cauchy_01.c
+++ b/Examples/cauchy_01.c
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdint.h>
diff --git a/Examples/cauchy_02.c b/Examples/cauchy_02.c
index f77f5e4..d5d37ee 100644
--- a/Examples/cauchy_02.c
+++ b/Examples/cauchy_02.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,10 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- revised by S. Simmerman 2/25/08
- Re-revised by JSP to use GF-Complete - 1/2014
-*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/Examples/cauchy_03.c b/Examples/cauchy_03.c
index 5cd7ba6..b391da5 100644
--- a/Examples/cauchy_03.c
+++ b/Examples/cauchy_03.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,10 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- revised by S. Simmerman 2/25/08
- Re-revised by JSP to use GF-Complete - 1/2014
-*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/Examples/cauchy_04.c b/Examples/cauchy_04.c
index d12fab4..1db9df3 100644
--- a/Examples/cauchy_04.c
+++ b/Examples/cauchy_04.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,10 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- revised by S. Simmerman 2/25/08
- Re-revised by JSP to use GF-Complete - 1/2014
-*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/Examples/decoder.c b/Examples/decoder.c
index 9fb8adb..e6e9219 100644
--- a/Examples/decoder.c
+++ b/Examples/decoder.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
/*
This program takes as input an inputfile, k, m, a coding
diff --git a/Examples/encoder.c b/Examples/encoder.c
index c675a74..1b76af9 100644
--- a/Examples/encoder.c
+++ b/Examples/encoder.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
/*
@@ -47,8 +53,8 @@ the original file and m of the files are encoded based on
the given coding technique. The format of the created files
is the file name with "_k#" or "_m#" and then the extension.
(For example, inputfile test.txt would yield file "test_k1.txt".)
+*/
- */
#include <sys/time.h>
#include <sys/stat.h>
#include <string.h>
diff --git a/Examples/jerasure_01.c b/Examples/jerasure_01.c
index b12b921..b6717c4 100644
--- a/Examples/jerasure_01.c
+++ b/Examples/jerasure_01.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,7 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/jerasure_02.c b/Examples/jerasure_02.c
index 650e4ed..9f806bc 100644
--- a/Examples/jerasure_02.c
+++ b/Examples/jerasure_02.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/jerasure_03.c b/Examples/jerasure_03.c
index 9a71dc8..1d1317b 100644
--- a/Examples/jerasure_03.c
+++ b/Examples/jerasure_03.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,7 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/jerasure_04.c b/Examples/jerasure_04.c
index d2749ec..e550e3f 100644
--- a/Examples/jerasure_04.c
+++ b/Examples/jerasure_04.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,7 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/jerasure_05.c b/Examples/jerasure_05.c
index bae611f..b74901d 100644
--- a/Examples/jerasure_05.c
+++ b/Examples/jerasure_05.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,12 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
-/*
- revised by S. Simmerman
- 2/25/08
-*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/jerasure_06.c b/Examples/jerasure_06.c
index 5931272..69f8357 100644
--- a/Examples/jerasure_06.c
+++ b/Examples/jerasure_06.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,11 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-/*
- revised by S. Simmerman
- 2/25/08
-*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/Examples/jerasure_07.c b/Examples/jerasure_07.c
index eeaf6de..74794c3 100644
--- a/Examples/jerasure_07.c
+++ b/Examples/jerasure_07.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,12 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
-/*
- revised by S. Simmerman
- 2/25/08
-*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/jerasure_08.c b/Examples/jerasure_08.c
index f002396..1894a7f 100644
--- a/Examples/jerasure_08.c
+++ b/Examples/jerasure_08.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,7 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/Examples/liberation_01.c b/Examples/liberation_01.c
index 2d0a753..2cd1862 100644
--- a/Examples/liberation_01.c
+++ b/Examples/liberation_01.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,12 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
-/*
- revised by S. Simmerman
- 2/25/08
-*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/reed_sol_01.c b/Examples/reed_sol_01.c
index 9fed92a..32641b5 100644
--- a/Examples/reed_sol_01.c
+++ b/Examples/reed_sol_01.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,8 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
-/* Part of this code was revised by Scott Simmerman 2/25/08 */
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/reed_sol_02.c b/Examples/reed_sol_02.c
index 5ad206a..445e91e 100644
--- a/Examples/reed_sol_02.c
+++ b/Examples/reed_sol_02.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/reed_sol_03.c b/Examples/reed_sol_03.c
index 3e1bd80..5440795 100644
--- a/Examples/reed_sol_03.c
+++ b/Examples/reed_sol_03.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,12 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
-/*
- revised by S. Simmerman
- 2/25/08
-*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/reed_sol_04.c b/Examples/reed_sol_04.c
index 94fd52e..79fae54 100644
--- a/Examples/reed_sol_04.c
+++ b/Examples/reed_sol_04.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/Examples/reed_sol_test_gf.c b/Examples/reed_sol_test_gf.c
index f49c17c..611f813 100644
--- a/Examples/reed_sol_test_gf.c
+++ b/Examples/reed_sol_test_gf.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,7 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Examples/reed_sol_time_gf.c b/Examples/reed_sol_time_gf.c
index 61c08cd..ca5923b 100644
--- a/Examples/reed_sol_time_gf.c
+++ b/Examples/reed_sol_time_gf.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan.
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/README b/README
index a7ade2f..d7fed34 100644
--- a/README
+++ b/README
@@ -7,13 +7,12 @@ External Documentation:
See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
-See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
-on GF-Complete and the tarball needed to install it.
-
-Custom usgae of GF-Complete is explained in this file (see below).
+See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
+Custom usage of GF-Complete is explained in this file (see below).
+
There are two directories of source code:
The src directory contains the jerasure code.
diff --git a/README.nd b/README.nd
index b705d10..d7fed34 100644
--- a/README.nd
+++ b/README.nd
@@ -1,21 +1,21 @@
This is revision 2.0 of Jerasure. This is pretty much Jerasure 1.2 without the
-original Galois Field backend. Version 2.0 links directly to GF-Complete.
+original Galois Field backend. Version 2.0 links directly to GF-Complete, which
+is more flexible than the original, and *much* faster, because it leverages SIMD
+instructions.
External Documentation:
See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
-See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
-on GF-Complete and the tarball needed to install it.
-
-Custom usgae of GF-Complete is explained in this file (see below).
+See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
-There are two directories:
+Custom usage of GF-Complete is explained in this file (see below).
-The src directory contains the jerasure code.
+There are two directories of source code:
+The src directory contains the jerasure code.
The Examples directory contains the example programs.
The makefile assumes that Examples is a subdirectory of the home directory.
@@ -33,7 +33,7 @@ Installing:
This will install the examples under PREFIX/bin, the library under PREFIX/lib
and the header files under PREFIX/include
-See individual source file to determine what the examples do.
+See individual source files to determine what the examples do.
Inclusion of GF-Complete:
@@ -44,8 +44,8 @@ determine the default field to use, if one is not specified.
If you would like to explore a using a different Galois Field implementation,
you can dynamically set the backend GF for a given word-size (w).
-The new galois.[ch] exports the following functions to be used by applications
-for dynamically setting the backend GF:
+The new galois.c and galois.h export the following functions to be used by applications
+for dynamically setting the back-end GF:
1.) galois_change_technique
@@ -53,21 +53,25 @@ for dynamically setting the backend GF:
void galois_change_technique(gf_t *gf, int w);
+ This is the recommended way for you to change techniques.
+
This function will take a pointer to a Galois field structure and set it as the
current backend for all operations in GF(2^w). Note that you must specify 'w'
here, since the internal GF structure is mostly opaque to Jerasure. Be sure to
change the technique with the correct structure and word-size.
- There are a few ways to get a pointer to a gf_t structure: via GF-Complete or
- using the helper functions provided by Jerasure: galois_init_field and
- galois_init_composite_field.
+ There are a few ways to get a pointer to a gf_t structure: GF-Complete gives three
+ primitives for this -- create_gf_from_argv(), gf_init_easy() and gf_init_hard().
+ Please read the documentation on GF-Complete for how these work. By far, the
+ most powerful and easy is create_gf_from_argv(), which parses an argv-style
+ string. Otherwise, the most flexible is gf_init_hard().
- GF-Complete exposes create_gf_from_argv, gf_init_easy and gf_init_hard. See
- the GF-Complete documentation for more detail on how to use those functions.
- You can definitely create more complicated fields with the GF-Complete
- initialization functions, but the two helper functions provided by Jerasure
- (galois_init_field and galois_init_composite_field) can be used to create most
- of the supported Galois Fields.
+ In galois.c/galois.h, we have defined galois_init_field(), which is pretty much
+ identical to gf_init_hard(), except it performs memory allocation with malloc(),
+ and galois_init_composite_field(), which facilitates creating composite fields.
+
+ These are described below, but once again, we recommend using create_gf_from_argv()
+ or gf_init_hard() if you want to change your Galois field.
2.) galois_init_field
@@ -149,10 +153,6 @@ For more information on how to change the backing fields for Jerasure, please re
2.) Examples/reed_sol_time_gf.c: Runs more thorough timing and validation tests
for a backing GF (uses create_gf_from_argv to get gf_t pointer)
- 3.) Examples/reed_sol_hard_time_gf.c: Runs more thorough timing and validation tests
- for a backing GF (uses galois_init_field and galois_init_composite_field to get gf_t
- pointer)
-
Performance:
There are two performance-based test scripts: time_all_gfs_argv_init.sh and
@@ -174,3 +174,4 @@ the test run of
is recorded as this in PERF.txt:
_12_3_8_128_65536_-m_SPLIT_8_4_-r_SSE_- 2813.34
+
diff --git a/README.txt b/README.txt
index a7ade2f..d7fed34 100644
--- a/README.txt
+++ b/README.txt
@@ -7,13 +7,12 @@ External Documentation:
See technical report CS-08-627 for a description of the main interfaces (Version 1.2)
-See http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html for information
-on GF-Complete and the tarball needed to install it.
-
-Custom usgae of GF-Complete is explained in this file (see below).
+See https://bitbucket.org/jimplank/gf-complete for GF-Complete.
NOTE: You must have GF-Complete installed in order to use Jerasure 2.0.
+Custom usage of GF-Complete is explained in this file (see below).
+
There are two directories of source code:
The src directory contains the jerasure code.
diff --git a/src/cauchy.c b/src/cauchy.c
index eec5633..f63dfb7 100644
--- a/src/cauchy.c
+++ b/src/cauchy.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/cauchy_best_r6.c b/src/cauchy_best_r6.c
index be3b03e..8a52e59 100644
--- a/src/cauchy_best_r6.c
+++ b/src/cauchy_best_r6.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/galois.c b/src/galois.c
index ca30dcf..2cfa284 100644
--- a/src/galois.c
+++ b/src/galois.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/jerasure.c b/src/jerasure.c
index 21784ac..cb4f4c5 100644
--- a/src/jerasure.c
+++ b/src/jerasure.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/liberation.c b/src/liberation.c
index 75d5cd3..11a1c4f 100644
--- a/src/liberation.c
+++ b/src/liberation.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,6 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/reed_sol.c b/src/reed_sol.c
index 77407f3..1b96587 100644
--- a/src/reed_sol.c
+++ b/src/reed_sol.c
@@ -1,5 +1,5 @@
/* *
- * Copyright (c) 2013, James S. Plank and Kevin Greenan
+ * Copyright (c) 2014, James S. Plank and Kevin Greenan
* All rights reserved.
*
* Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
@@ -37,11 +37,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Jerasure's authors:
+
+ Revision 2.x - 2014: James S. Plank and Kevin M. Greenan
+ Revision 1.2 - 2008: James S. Plank, Scott Simmerman and Catherine D. Schuman.
+ Revision 1.0 - 2007: James S. Plank
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <gf_complete.h>
#include "galois.h"
#include "jerasure.h"
#include "reed_sol.h"
@@ -91,118 +98,52 @@ int *reed_sol_vandermonde_coding_matrix(int k, int m, int w)
return dist;
}
-static int prim32 = -1;
-
-#define rgw32_mask(v) ((v) & 0x80000000)
-
-void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
-{
- int *l1;
- int *ltop;
- char *ctop;
-
- if (prim32 == -1) prim32 = galois_single_multiply((1 << 31), 2, 32);
-
- ctop = region + nbytes;
- ltop = (int *) ctop;
- l1 = (int *) region;
-
- while (l1 < ltop) {
- *l1 = ((*l1) << 1) ^ ((*l1 & 0x80000000) ? prim32 : 0);
- l1++;
- }
-}
-
static int prim08 = -1;
-static int mask08_1 = -1;
-static int mask08_2 = -1;
+static gf_t GF08;
void reed_sol_galois_w08_region_multby_2(char *region, int nbytes)
{
- unsigned int *l1;
- unsigned int *ltop;
- char *ctop;
- unsigned int tmp, tmp2;
-
-
if (prim08 == -1) {
- tmp = galois_single_multiply((1 << 7), 2, 8);
- prim08 = 0;
- while (tmp != 0) {
- prim08 |= tmp;
- tmp = (tmp << 8);
- }
- tmp = (1 << 8) - 2;
- mask08_1 = 0;
- while (tmp != 0) {
- mask08_1 |= tmp;
- tmp = (tmp << 8);
- }
- tmp = (1 << 7);
- mask08_2 = 0;
- while (tmp != 0) {
- mask08_2 |= tmp;
- tmp = (tmp << 8);
+ prim08 = galois_single_multiply((1 << 7), 2, 8);
+ if (!gf_init_hard(&GF08, 8, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
+ prim08, 0, 0, NULL, NULL)) {
+ fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w08_region_multby_2\n");
+ exit(1);
}
}
-
- ctop = region + nbytes;
- ltop = (unsigned int *) ctop;
- l1 = (unsigned int *) region;
-
- while (l1 < ltop) {
- tmp = ((*l1) << 1) & mask08_1;
- tmp2 = (*l1) & mask08_2;
- tmp2 = ((tmp2 << 1) - (tmp2 >> 7));
- *l1 = (tmp ^ (tmp2 & prim08));
- l1++;
- }
+ GF08.multiply_region.w32(&GF08, region, region, 2, nbytes, 0);
}
static int prim16 = -1;
-static int mask16_1 = -1;
-static int mask16_2 = -1;
+static gf_t GF16;
void reed_sol_galois_w16_region_multby_2(char *region, int nbytes)
{
- unsigned int *l1;
- unsigned int *ltop;
- char *ctop;
- unsigned int tmp, tmp2;
-
-
if (prim16 == -1) {
- tmp = galois_single_multiply((1 << 15), 2, 16);
- prim16 = 0;
- while (tmp != 0) {
- prim16 |= tmp;
- tmp = (tmp << 16);
- }
- tmp = (1 << 16) - 2;
- mask16_1 = 0;
- while (tmp != 0) {
- mask16_1 |= tmp;
- tmp = (tmp << 16);
- }
- tmp = (1 << 15);
- mask16_2 = 0;
- while (tmp != 0) {
- mask16_2 |= tmp;
- tmp = (tmp << 16);
+ prim16 = galois_single_multiply((1 << 15), 2, 16);
+ if (!gf_init_hard(&GF16, 16, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
+ prim16, 0, 0, NULL, NULL)) {
+ fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w16_region_multby_2\n");
+ exit(1);
}
}
+ GF16.multiply_region.w32(&GF16, region, region, 2, nbytes, 0);
+}
- ctop = region + nbytes;
- ltop = (unsigned int *) ctop;
- l1 = (unsigned int *) region;
+static int prim32 = -1;
+static gf_t GF32;
- while (l1 < ltop) {
- tmp = ((*l1) << 1) & mask16_1;
- tmp2 = (*l1) & mask16_2;
- tmp2 = ((tmp2 << 1) - (tmp2 >> 15));
- *l1 = (tmp ^ (tmp2 & prim16));
- l1++;
+void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
+{
+ if (prim32 == -1) {
+ prim32 = galois_single_multiply((1 << 31), 2, 32);
+ if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
+ prim32, 0, 0, NULL, NULL)) {
+ fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n");
+ exit(1);
+ }
}
+ GF32.multiply_region.w32(&GF32, region, region, 2, nbytes, 0);
}
int reed_sol_r6_encode(int k, int w, char **data_ptrs, char **coding_ptrs, int size)