]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/blobdiff - zfec/zfec/fec.c
whitespace, docstrings, copyright statements
[tahoe-lafs/zfec.git] / zfec / zfec / fec.c
index ba6e347b59199507b876011a6d0ec8078eec16c9..a18a4f69bfc26473473e1d59037c72d2f7dedb1b 100644 (file)
@@ -412,7 +412,7 @@ fec_free (fec_t *p) {
 }
 
 fec_t *
-fec_new(unsigned k, unsigned n) {
+fec_new(unsigned short k, unsigned short n) {
     unsigned row, col;
     gf *p, *tmp_m;
 
@@ -456,9 +456,11 @@ fec_new(unsigned k, unsigned n) {
     return retval;
 }
 
-/* To make sure that we stay within cache in the inner loops of fec_encode()
-   and fec_decode(). */
+/* To make sure that we stay within cache in the inner loops of fec_encode().  (It would
+   probably help to also do this for fec_decode(). */
+#ifndef STRIDE
 #define STRIDE 8192
+#endif
 
 void
 fec_encode(const fec_t* code, const gf*restrict const*restrict const src, gf*restrict const*restrict const fecs, const unsigned*restrict const block_nums, size_t num_block_nums, size_t sz) {
@@ -521,12 +523,12 @@ fec_decode(const fec_t* code, const gf*restrict const*restrict const inpkts, gf*
 
 /**
  * zfec -- fast forward error correction library with Python interface
- * 
- * Copyright (C) 2007 Allmydata, Inc.
+ *
+ * Copyright (C) 2007-2010 Zooko Wilcox-O'Hearn
  * Author: Zooko Wilcox-O'Hearn
- * 
+ *
  * This file is part of zfec.
- * 
+ *
  * See README.txt for licensing information.
  */
 
@@ -540,7 +542,7 @@ fec_decode(const fec_t* code, const gf*restrict const*restrict const inpkts, gf*
  * Robert Morelos-Zaragoza (robert@spectra.eng.hawaii.edu) and Hari
  * Thirumoorthy (harit@spectra.eng.hawaii.edu), Aug 1995
  *
- * Modifications by Dan Rubenstein (see Modifications.txt for 
+ * Modifications by Dan Rubenstein (see Modifications.txt for
  * their description.
  * Modifications (C) 1998 Dan Rubenstein (drubenst@cs.umass.edu)
  *