Browse Source

This is the squashed pull request from David Glessner, squashed

and reviewed by Kevin Greenan.

Updated README

Allow out-of-source builds. Quiet autogen.sh warnings.

Use AM_CPPFLAGS instead of INCLUDES. Use $(top_srcdir).

Add .gitignore to quiet git status.

Add project URL to AC_INIT.

Stop libtool from compiling files twice.

Have git ignore .deps/.

Don't override user CPPFLAGS.

(PIC options appear to be set already. INCLUDES already included.)

Clean configure.ac.

Make it closer to autoscan output.

Have autotools create INSTALL.

Use AC_MSG_FAILURE if GF-Complete not found.

Run autogen.sh.

(autoconf 2.69, automake 1.14.1, libtool 2.4.2)

Add some .gitignore files.

Fix configure cpuid unknown issue.

Move AX_EXT before AC_CHECK_LIB(gf_complete...) so that
-lgf_complete doesn't cause CPUID conftest compile to fail.

Don't check for internal gf_int.h header.

GF-Complete doesn't install it.

Quiet some autoreconf warnings.

INCLUDES is now AM_CPPFLAGS. Use single-argument AM_INIT_AUTOMAKE.

Remove some AC_REQUIRE whose conftest always failed.

Quiet configure warning.

(ARCH_64 doesn't appear to be used.)

CPUID "unknown" fix from upstream autoconf-archive.

Allow out-of-source builds. Use dependency tracking.

Remove config.h.in~.

Update ax_check_compile_flag.m4 from autoconf-archive.

Add .gitattributes.

Remove autoreconf-generated files.

Remove ACLOCAL_AMFLAGS.

See Automake 1.13 release notes.

Add files for 'make dist'.

Quiet some warnings.

getcwd() in <unistd.h>. Remove some vars.

Make headers compatible with C++.

Quiet some warnings.

Install additional headers in include/jerasure/.

Quiet some configure check internal failures.

Use new AX_REQUIRE_DEFINED instead of AC_REQUIRE, which expands
the macro and causes internal compile failure.

Fix file permissions.

Remove INTEL_SSE compiler defines.

(Can use HAVE_xxx or __xxx__ instead.)

Set default CFLAGS to '-g -O3 -Wall'.

Add more checks from autoscan.

Use AC_CONFIG_AUX_DIR([build-aux]).

Use processor time for timing.

Use clock() instead of gettimeofday().

Use common LDADD in Makefile.am.

Remove pre-autotools makefiles.

Ignore *.a. (Missed earlier.)

Quiet more warnings.

Document need for autoreconf -fi.

Removed README.nd and README.txt so changes don't need to be duplicated.

Remove autogen.sh.

Just use "autoreconf --force --install".
master
David Glessner 8 years ago
committed by Kevin Greenan
parent
commit
e79904ea00
  1. 3
      .gitattributes
  2. 25
      .gitignore
  3. 8
      Examples/.gitignore
  4. 45
      Examples/Makefile.am
  5. 688
      Examples/Makefile.in
  6. 6
      Examples/cauchy_01.c
  7. 10
      Examples/cauchy_02.c
  8. 10
      Examples/cauchy_03.c
  9. 10
      Examples/cauchy_04.c
  10. 42
      Examples/decoder.c
  11. 63
      Examples/encoder.c
  12. 2
      Examples/jerasure_01.c
  13. 2
      Examples/jerasure_02.c
  14. 2
      Examples/jerasure_03.c
  15. 2
      Examples/jerasure_04.c
  16. 3
      Examples/jerasure_05.c
  17. 5
      Examples/jerasure_06.c
  18. 5
      Examples/jerasure_07.c
  19. 9
      Examples/jerasure_08.c
  20. 9
      Examples/liberation_01.c
  21. 203
      Examples/makefile.orig
  22. 4
      Examples/reed_sol_01.c
  23. 5
      Examples/reed_sol_02.c
  24. 4
      Examples/reed_sol_03.c
  25. 4
      Examples/reed_sol_04.c
  26. 12
      Examples/reed_sol_test_gf.c
  27. 39
      Examples/reed_sol_time_gf.c
  28. 370
      INSTALL
  29. 5
      Makefile.am
  30. 745
      Makefile.in
  31. 26
      README
  32. 62
      README.nd
  33. 62
      README.txt
  34. 662
      aclocal.m4
  35. 2
      autogen.sh
  36. 1530
      config.guess
  37. 1773
      config.sub
  38. 14762
      configure
  39. 50
      configure.ac
  40. 9
      include/cauchy.h
  41. 107
      include/config.h.in
  42. 107
      include/config.h.in~
  43. 14
      include/galois.h
  44. 8
      include/jerasure.h
  45. 7
      include/liberation.h
  46. 9
      include/reed_sol.h
  47. 43
      include/timing.h
  48. 527
      install-sh
  49. 9661
      ltmain.sh
  50. 8
      m4/ax_check_compile_flag.m4
  51. 28
      m4/ax_ext.m4
  52. 37
      m4/ax_require_defined.m4
  53. 8001
      m4/libtool.m4
  54. 384
      m4/ltoptions.m4
  55. 123
      m4/ltsugar.m4
  56. 23
      m4/ltversion.m4
  57. 98
      m4/lt~obsolete.m4
  58. 79
      makefile.orig
  59. 331
      missing
  60. 14
      src/Makefile.am
  61. 543
      src/Makefile.in
  62. 63
      src/timing.c

3
.gitattributes

@ -0,0 +1,3 @@
*.ac eol=lf
*.am eol=lf
*.sh eol=lf

25
.gitignore

@ -0,0 +1,25 @@
/INSTALL
Makefile
Makefile.in
/aclocal.m4
/autom4te.cache/
/autoscan.log
/build-aux/
/config.log
/config.status
/configure
/configure.scan
.deps/
/include/config.h
/include/config.h.in
/include/stamp-h1
.libs/
/libtool
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
*.l[ao]
*.[ao]
*~

8
Examples/.gitignore

@ -0,0 +1,8 @@
/cauchy_[0-9][0-9]
/decoder
/encoder
/jerasure_[0-9][0-9]
/liberation_[0-9][0-9]
/reed_sol_[0-9][0-9]
/reed_sol_test_gf
/reed_sol_time_gf

45
Examples/Makefile.am

@ -1,6 +1,6 @@
# Jerasure AM file
INCLUDES=-I../
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC $(INCLUDES)
bin_PROGRAMS = jerasure_01 \
@ -25,65 +25,36 @@ bin_PROGRAMS = jerasure_01 \
encoder \
decoder
jerasure_01_SOURCES = jerasure_01.c
jerasure_01_LDADD = ../src/libJerasure.la
dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
jerasure_01_SOURCES = jerasure_01.c
jerasure_02_SOURCES = jerasure_02.c
jerasure_02_LDADD = ../src/libJerasure.la
jerasure_03_SOURCES = jerasure_03.c
jerasure_03_LDADD = ../src/libJerasure.la
jerasure_04_SOURCES = jerasure_04.c
jerasure_04_LDADD = ../src/libJerasure.la
jerasure_05_SOURCES = jerasure_05.c
jerasure_05_LDADD = ../src/libJerasure.la
jerasure_06_SOURCES = jerasure_06.c
jerasure_06_LDADD = ../src/libJerasure.la
jerasure_07_SOURCES = jerasure_07.c
jerasure_07_LDADD = ../src/libJerasure.la
jerasure_08_SOURCES = jerasure_08.c
jerasure_08_LDADD = ../src/libJerasure.la
reed_sol_01_SOURCES = reed_sol_01.c
reed_sol_01_LDADD = ../src/libJerasure.la
reed_sol_02_SOURCES = reed_sol_02.c
reed_sol_02_LDADD = ../src/libJerasure.la
reed_sol_03_SOURCES = reed_sol_03.c
reed_sol_03_LDADD = ../src/libJerasure.la
reed_sol_04_SOURCES = reed_sol_04.c
reed_sol_04_LDADD = ../src/libJerasure.la
reed_sol_test_gf_SOURCES = reed_sol_test_gf.c
reed_sol_test_gf_LDADD = ../src/libJerasure.la
reed_sol_time_gf_SOURCES = reed_sol_time_gf.c
reed_sol_time_gf_LDADD = ../src/libJerasure.la
cauchy_01_SOURCES = cauchy_01.c
cauchy_01_LDADD = ../src/libJerasure.la
cauchy_02_SOURCES = cauchy_02.c
cauchy_02_LDADD = ../src/libJerasure.la
cauchy_03_SOURCES = cauchy_03.c
cauchy_03_LDADD = ../src/libJerasure.la
cauchy_04_SOURCES = cauchy_04.c
cauchy_04_LDADD = ../src/libJerasure.la
liberation_01_SOURCES = liberation_01.c
liberation_01_LDADD = ../src/libJerasure.la
decoder_SOURCES = decoder.c
encoder_SOURCES = encoder.c
encoder_LDADD = ../src/libJerasure.la
decoder_SOURCES = decoder.c
decoder_LDADD = ../src/libJerasure.la
LDADD = ../src/libJerasure.la
decoder_LDADD = $(LDADD) ../src/libtiming.a
encoder_LDADD = $(LDADD) ../src/libtiming.a
reed_sol_time_gf_LDADD = $(LDADD) ../src/libtiming.a

688
Examples/Makefile.in

@ -1,688 +0,0 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Jerasure AM file
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = jerasure_01$(EXEEXT) jerasure_02$(EXEEXT) \
jerasure_03$(EXEEXT) jerasure_04$(EXEEXT) jerasure_05$(EXEEXT) \
jerasure_06$(EXEEXT) jerasure_07$(EXEEXT) jerasure_08$(EXEEXT) \
reed_sol_01$(EXEEXT) reed_sol_02$(EXEEXT) reed_sol_03$(EXEEXT) \
reed_sol_04$(EXEEXT) reed_sol_test_gf$(EXEEXT) \
reed_sol_time_gf$(EXEEXT) \
cauchy_01$(EXEEXT) cauchy_02$(EXEEXT) cauchy_03$(EXEEXT) \
cauchy_04$(EXEEXT) liberation_01$(EXEEXT) encoder$(EXEEXT) \
decoder$(EXEEXT)
subdir = Examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_ext.m4 \
$(top_srcdir)/m4/ax_gcc_x86_avx_xgetbv.m4 \
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_cauchy_01_OBJECTS = cauchy_01.$(OBJEXT)
cauchy_01_OBJECTS = $(am_cauchy_01_OBJECTS)
cauchy_01_DEPENDENCIES = ../src/libJerasure.la
am_cauchy_02_OBJECTS = cauchy_02.$(OBJEXT)
cauchy_02_OBJECTS = $(am_cauchy_02_OBJECTS)
cauchy_02_DEPENDENCIES = ../src/libJerasure.la
am_cauchy_03_OBJECTS = cauchy_03.$(OBJEXT)
cauchy_03_OBJECTS = $(am_cauchy_03_OBJECTS)
cauchy_03_DEPENDENCIES = ../src/libJerasure.la
am_cauchy_04_OBJECTS = cauchy_04.$(OBJEXT)
cauchy_04_OBJECTS = $(am_cauchy_04_OBJECTS)
cauchy_04_DEPENDENCIES = ../src/libJerasure.la
am_decoder_OBJECTS = decoder.$(OBJEXT)
decoder_OBJECTS = $(am_decoder_OBJECTS)
decoder_DEPENDENCIES = ../src/libJerasure.la
am_encoder_OBJECTS = encoder.$(OBJEXT)
encoder_OBJECTS = $(am_encoder_OBJECTS)
encoder_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_01_OBJECTS = jerasure_01.$(OBJEXT)
jerasure_01_OBJECTS = $(am_jerasure_01_OBJECTS)
jerasure_01_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_02_OBJECTS = jerasure_02.$(OBJEXT)
jerasure_02_OBJECTS = $(am_jerasure_02_OBJECTS)
jerasure_02_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_03_OBJECTS = jerasure_03.$(OBJEXT)
jerasure_03_OBJECTS = $(am_jerasure_03_OBJECTS)
jerasure_03_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_04_OBJECTS = jerasure_04.$(OBJEXT)
jerasure_04_OBJECTS = $(am_jerasure_04_OBJECTS)
jerasure_04_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_05_OBJECTS = jerasure_05.$(OBJEXT)
jerasure_05_OBJECTS = $(am_jerasure_05_OBJECTS)
jerasure_05_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_06_OBJECTS = jerasure_06.$(OBJEXT)
jerasure_06_OBJECTS = $(am_jerasure_06_OBJECTS)
jerasure_06_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_07_OBJECTS = jerasure_07.$(OBJEXT)
jerasure_07_OBJECTS = $(am_jerasure_07_OBJECTS)
jerasure_07_DEPENDENCIES = ../src/libJerasure.la
am_jerasure_08_OBJECTS = jerasure_08.$(OBJEXT)
jerasure_08_OBJECTS = $(am_jerasure_08_OBJECTS)
jerasure_08_DEPENDENCIES = ../src/libJerasure.la
am_liberation_01_OBJECTS = liberation_01.$(OBJEXT)
liberation_01_OBJECTS = $(am_liberation_01_OBJECTS)
liberation_01_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_01_OBJECTS = reed_sol_01.$(OBJEXT)
reed_sol_01_OBJECTS = $(am_reed_sol_01_OBJECTS)
reed_sol_01_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_02_OBJECTS = reed_sol_02.$(OBJEXT)
reed_sol_02_OBJECTS = $(am_reed_sol_02_OBJECTS)
reed_sol_02_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_03_OBJECTS = reed_sol_03.$(OBJEXT)
reed_sol_03_OBJECTS = $(am_reed_sol_03_OBJECTS)
reed_sol_03_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_04_OBJECTS = reed_sol_04.$(OBJEXT)
reed_sol_04_OBJECTS = $(am_reed_sol_04_OBJECTS)
reed_sol_04_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_test_gf_OBJECTS = reed_sol_test_gf.$(OBJEXT)
reed_sol_test_gf_OBJECTS = $(am_reed_sol_test_gf_OBJECTS)
reed_sol_test_gf_DEPENDENCIES = ../src/libJerasure.la
am_reed_sol_time_gf_OBJECTS = reed_sol_time_gf.$(OBJEXT)
reed_sol_time_gf_OBJECTS = $(am_reed_sol_time_gf_OBJECTS)
reed_sol_time_gf_DEPENDENCIES = ../src/libJerasure.la
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(cauchy_01_SOURCES) $(cauchy_02_SOURCES) \
$(cauchy_03_SOURCES) $(cauchy_04_SOURCES) $(decoder_SOURCES) \
$(encoder_SOURCES) $(jerasure_01_SOURCES) \
$(jerasure_02_SOURCES) $(jerasure_03_SOURCES) \
$(jerasure_04_SOURCES) $(jerasure_05_SOURCES) \
$(jerasure_06_SOURCES) $(jerasure_07_SOURCES) \
$(jerasure_08_SOURCES) $(liberation_01_SOURCES) \
$(reed_sol_01_SOURCES) $(reed_sol_02_SOURCES) \
$(reed_sol_03_SOURCES) $(reed_sol_04_SOURCES) \
$(reed_sol_test_gf_SOURCES) \
$(reed_sol_time_gf_SOURCES)
DIST_SOURCES = $(cauchy_01_SOURCES) $(cauchy_02_SOURCES) \
$(cauchy_03_SOURCES) $(cauchy_04_SOURCES) $(decoder_SOURCES) \
$(encoder_SOURCES) $(jerasure_01_SOURCES) \
$(jerasure_02_SOURCES) $(jerasure_03_SOURCES) \
$(jerasure_04_SOURCES) $(jerasure_05_SOURCES) \
$(jerasure_06_SOURCES) $(jerasure_07_SOURCES) \
$(jerasure_08_SOURCES) $(liberation_01_SOURCES) \
$(reed_sol_01_SOURCES) $(reed_sol_02_SOURCES) \
$(reed_sol_03_SOURCES) $(reed_sol_04_SOURCES) \
$(reed_sol_test_gf_SOURCES) \
$(reed_sol_time_gf_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIMD_FLAGS = @SIMD_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = -I../
AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC $(INCLUDES)
jerasure_01_SOURCES = jerasure_01.c
jerasure_01_LDADD = ../src/libJerasure.la
jerasure_02_SOURCES = jerasure_02.c
jerasure_02_LDADD = ../src/libJerasure.la
jerasure_03_SOURCES = jerasure_03.c
jerasure_03_LDADD = ../src/libJerasure.la
jerasure_04_SOURCES = jerasure_04.c
jerasure_04_LDADD = ../src/libJerasure.la
jerasure_05_SOURCES = jerasure_05.c
jerasure_05_LDADD = ../src/libJerasure.la
jerasure_06_SOURCES = jerasure_06.c
jerasure_06_LDADD = ../src/libJerasure.la
jerasure_07_SOURCES = jerasure_07.c
jerasure_07_LDADD = ../src/libJerasure.la
jerasure_08_SOURCES = jerasure_08.c
jerasure_08_LDADD = ../src/libJerasure.la
reed_sol_01_SOURCES = reed_sol_01.c
reed_sol_01_LDADD = ../src/libJerasure.la
reed_sol_02_SOURCES = reed_sol_02.c
reed_sol_02_LDADD = ../src/libJerasure.la
reed_sol_03_SOURCES = reed_sol_03.c
reed_sol_03_LDADD = ../src/libJerasure.la
reed_sol_04_SOURCES = reed_sol_04.c
reed_sol_04_LDADD = ../src/libJerasure.la
reed_sol_test_gf_SOURCES = reed_sol_test_gf.c
reed_sol_test_gf_LDADD = ../src/libJerasure.la
reed_sol_time_gf_SOURCES = reed_sol_time_gf.c
reed_sol_time_gf_LDADD = ../src/libJerasure.la
cauchy_01_SOURCES = cauchy_01.c
cauchy_01_LDADD = ../src/libJerasure.la
cauchy_02_SOURCES = cauchy_02.c
cauchy_02_LDADD = ../src/libJerasure.la
cauchy_03_SOURCES = cauchy_03.c
cauchy_03_LDADD = ../src/libJerasure.la
cauchy_04_SOURCES = cauchy_04.c
cauchy_04_LDADD = ../src/libJerasure.la
liberation_01_SOURCES = liberation_01.c
liberation_01_LDADD = ../src/libJerasure.la
encoder_SOURCES = encoder.c
encoder_LDADD = ../src/libJerasure.la
decoder_SOURCES = decoder.c
decoder_LDADD = ../src/libJerasure.la
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Examples/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu --ignore-deps Examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
cauchy_01$(EXEEXT): $(cauchy_01_OBJECTS) $(cauchy_01_DEPENDENCIES) $(EXTRA_cauchy_01_DEPENDENCIES)
@rm -f cauchy_01$(EXEEXT)
$(LINK) $(cauchy_01_OBJECTS) $(cauchy_01_LDADD) $(LIBS)
cauchy_02$(EXEEXT): $(cauchy_02_OBJECTS) $(cauchy_02_DEPENDENCIES) $(EXTRA_cauchy_02_DEPENDENCIES)
@rm -f cauchy_02$(EXEEXT)
$(LINK) $(cauchy_02_OBJECTS) $(cauchy_02_LDADD) $(LIBS)
cauchy_03$(EXEEXT): $(cauchy_03_OBJECTS) $(cauchy_03_DEPENDENCIES) $(EXTRA_cauchy_03_DEPENDENCIES)
@rm -f cauchy_03$(EXEEXT)
$(LINK) $(cauchy_03_OBJECTS) $(cauchy_03_LDADD) $(LIBS)
cauchy_04$(EXEEXT): $(cauchy_04_OBJECTS) $(cauchy_04_DEPENDENCIES) $(EXTRA_cauchy_04_DEPENDENCIES)
@rm -f cauchy_04$(EXEEXT)
$(LINK) $(cauchy_04_OBJECTS) $(cauchy_04_LDADD) $(LIBS)
decoder$(EXEEXT): $(decoder_OBJECTS) $(decoder_DEPENDENCIES) $(EXTRA_decoder_DEPENDENCIES)
@rm -f decoder$(EXEEXT)
$(LINK) $(decoder_OBJECTS) $(decoder_LDADD) $(LIBS)
encoder$(EXEEXT): $(encoder_OBJECTS) $(encoder_DEPENDENCIES) $(EXTRA_encoder_DEPENDENCIES)
@rm -f encoder$(EXEEXT)
$(LINK) $(encoder_OBJECTS) $(encoder_LDADD) $(LIBS)
jerasure_01$(EXEEXT): $(jerasure_01_OBJECTS) $(jerasure_01_DEPENDENCIES) $(EXTRA_jerasure_01_DEPENDENCIES)
@rm -f jerasure_01$(EXEEXT)
$(LINK) $(jerasure_01_OBJECTS) $(jerasure_01_LDADD) $(LIBS)
jerasure_02$(EXEEXT): $(jerasure_02_OBJECTS) $(jerasure_02_DEPENDENCIES) $(EXTRA_jerasure_02_DEPENDENCIES)
@rm -f jerasure_02$(EXEEXT)
$(LINK) $(jerasure_02_OBJECTS) $(jerasure_02_LDADD) $(LIBS)
jerasure_03$(EXEEXT): $(jerasure_03_OBJECTS) $(jerasure_03_DEPENDENCIES) $(EXTRA_jerasure_03_DEPENDENCIES)
@rm -f jerasure_03$(EXEEXT)
$(LINK) $(jerasure_03_OBJECTS) $(jerasure_03_LDADD) $(LIBS)
jerasure_04$(EXEEXT): $(jerasure_04_OBJECTS) $(jerasure_04_DEPENDENCIES) $(EXTRA_jerasure_04_DEPENDENCIES)
@rm -f jerasure_04$(EXEEXT)
$(LINK) $(jerasure_04_OBJECTS) $(jerasure_04_LDADD) $(LIBS)
jerasure_05$(EXEEXT): $(jerasure_05_OBJECTS) $(jerasure_05_DEPENDENCIES) $(EXTRA_jerasure_05_DEPENDENCIES)
@rm -f jerasure_05$(EXEEXT)
$(LINK) $(jerasure_05_OBJECTS) $(jerasure_05_LDADD) $(LIBS)
jerasure_06$(EXEEXT): $(jerasure_06_OBJECTS) $(jerasure_06_DEPENDENCIES) $(EXTRA_jerasure_06_DEPENDENCIES)
@rm -f jerasure_06$(EXEEXT)
$(LINK) $(jerasure_06_OBJECTS) $(jerasure_06_LDADD) $(LIBS)
jerasure_07$(EXEEXT): $(jerasure_07_OBJECTS) $(jerasure_07_DEPENDENCIES) $(EXTRA_jerasure_07_DEPENDENCIES)
@rm -f jerasure_07$(EXEEXT)
$(LINK) $(jerasure_07_OBJECTS) $(jerasure_07_LDADD) $(LIBS)
jerasure_08$(EXEEXT): $(jerasure_08_OBJECTS) $(jerasure_08_DEPENDENCIES) $(EXTRA_jerasure_08_DEPENDENCIES)
@rm -f jerasure_08$(EXEEXT)
$(LINK) $(jerasure_08_OBJECTS) $(jerasure_08_LDADD) $(LIBS)
liberation_01$(EXEEXT): $(liberation_01_OBJECTS) $(liberation_01_DEPENDENCIES) $(EXTRA_liberation_01_DEPENDENCIES)
@rm -f liberation_01$(EXEEXT)
$(LINK) $(liberation_01_OBJECTS) $(liberation_01_LDADD) $(LIBS)
reed_sol_01$(EXEEXT): $(reed_sol_01_OBJECTS) $(reed_sol_01_DEPENDENCIES) $(EXTRA_reed_sol_01_DEPENDENCIES)
@rm -f reed_sol_01$(EXEEXT)
$(LINK) $(reed_sol_01_OBJECTS) $(reed_sol_01_LDADD) $(LIBS)
reed_sol_02$(EXEEXT): $(reed_sol_02_OBJECTS) $(reed_sol_02_DEPENDENCIES) $(EXTRA_reed_sol_02_DEPENDENCIES)
@rm -f reed_sol_02$(EXEEXT)
$(LINK) $(reed_sol_02_OBJECTS) $(reed_sol_02_LDADD) $(LIBS)
reed_sol_03$(EXEEXT): $(reed_sol_03_OBJECTS) $(reed_sol_03_DEPENDENCIES) $(EXTRA_reed_sol_03_DEPENDENCIES)
@rm -f reed_sol_03$(EXEEXT)
$(LINK) $(reed_sol_03_OBJECTS) $(reed_sol_03_LDADD) $(LIBS)
reed_sol_04$(EXEEXT): $(reed_sol_04_OBJECTS) $(reed_sol_04_DEPENDENCIES) $(EXTRA_reed_sol_04_DEPENDENCIES)
@rm -f reed_sol_04$(EXEEXT)
$(LINK) $(reed_sol_04_OBJECTS) $(reed_sol_04_LDADD) $(LIBS)
reed_sol_test_gf$(EXEEXT): $(reed_sol_test_gf_OBJECTS) $(reed_sol_test_gf_DEPENDENCIES) $(EXTRA_reed_sol_test_gf_DEPENDENCIES)
@rm -f reed_sol_test_gf$(EXEEXT)
$(LINK) $(reed_sol_test_gf_OBJECTS) $(reed_sol_test_gf_LDADD) $(LIBS)
reed_sol_time_gf$(EXEEXT): $(reed_sol_time_gf_OBJECTS) $(reed_sol_time_gf_DEPENDENCIES) $(EXTRA_reed_sol_time_gf_DEPENDENCIES)
@rm -f reed_sol_time_gf$(EXEEXT)
$(LINK) $(reed_sol_time_gf_OBJECTS) $(reed_sol_time_gf_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

6
Examples/cauchy_01.c

@ -48,12 +48,13 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "cauchy.h"
#include "jerasure.h"
#include "reed_sol.h"
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: cauchy_01 n w - Converts the value n to a bitmatrix using GF(2^w).\n");
fprintf(stderr, " \n");
@ -70,7 +71,7 @@ usage(char *s)
int main(int argc, char **argv)
{
uint32_t n;
int n;
int i, no, w;
int *bitmatrix;
@ -106,5 +107,6 @@ int main(int argc, char **argv)
}
printf("# Ones: %d\n", cauchy_n_ones(n, w));
return 0;
}

10
Examples/cauchy_02.c

@ -54,7 +54,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: cauchy_02 k m w seed - CRS coding example using Bloemer's original matrix.\n");
fprintf(stderr, " \n");
@ -84,7 +84,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -113,9 +113,9 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
int k, w, i, j, m;
int k, w, i, m;
int *matrix, *bitmatrix, **schedule;
char **data, **coding, **ptrs, **dcopy, **ccopy;
char **data, **coding, **dcopy, **ccopy;
int no;
int *erasures, *erased;
double mstats[3], sstats[3];
@ -267,4 +267,6 @@ int main(int argc, char **argv)
printf("<p>\n");
print_array(coding, m, sizeof(long)*w, sizeof(long), "C");
printf("<hr>\n");
return 0;
}

10
Examples/cauchy_03.c

@ -54,7 +54,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: cauchy_03 k m w seed - CRS coding example improving the matrix.\n");
fprintf(stderr, " \n");
@ -88,7 +88,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -117,9 +117,9 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
int k, w, i, j, m;
int k, w, i, m;
int *matrix, *bitmatrix, **schedule;
char **data, **coding, **ptrs, **dcopy, **ccopy;
char **data, **coding, **dcopy, **ccopy;
int no;
int *erasures, *erased;
double mstats[3], sstats[3];
@ -285,4 +285,6 @@ int main(int argc, char **argv)
printf("<p>\n");
print_array(coding, m, sizeof(long)*w, sizeof(long), "C");
printf("<hr>\n");
return 0;
}

10
Examples/cauchy_04.c

@ -54,7 +54,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: cauchy_04 k m w seed - CRS coding example improving the matrix.\n");
fprintf(stderr, " \n");
@ -85,7 +85,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -114,9 +114,9 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
int k, w, i, j, m;
int k, w, i, m;
int *matrix, *bitmatrix, **schedule;
char **data, **coding, **ptrs, **dcopy, **ccopy;
char **data, **coding, **dcopy, **ccopy;
int no;
int *erasures, *erased;
double mstats[3], sstats[3];
@ -267,4 +267,6 @@ int main(int argc, char **argv)
printf("<p>\n");
print_array(coding, m, sizeof(long)*w, sizeof(long), "C");
printf("<hr>\n");
return 0;
}

42
Examples/decoder.c

@ -65,11 +65,13 @@ same arguments, and encoder.c does error check.
#include <sys/time.h>
#include <sys/stat.h>
#include <signal.h>
#include <unistd.h>
#include "jerasure.h"
#include "reed_sol.h"
#include "galois.h"
#include "cauchy.h"
#include "liberation.h"
#include "timing.h"
#define N 10
@ -116,8 +118,7 @@ int main (int argc, char **argv) {
char *curdir;
/* Used to time decoding */
struct timeval t1, t2, t3, t4;
struct timezone tz;
struct timing t1, t2, t3, t4;
double tsec;
double totalsec;
@ -129,7 +130,7 @@ int main (int argc, char **argv) {
totalsec = 0.0;
/* Start timing */
gettimeofday(&t1, &tz);
timing_set(&t1);
/* Error checking parameters */
if (argc != 2) {
@ -216,7 +217,7 @@ int main (int argc, char **argv) {
sprintf(temp, "%d", k);
md = strlen(temp);
gettimeofday(&t3, &tz);
timing_set(&t3);
/* Create coding matrix or bitmatrix */
switch(tech) {
@ -245,14 +246,8 @@ int main (int argc, char **argv) {
case Liber8tion:
bitmatrix = liber8tion_coding_bitmatrix(k);
}
gettimeofday(&t4, &tz);
tsec = 0.0;
tsec += t4.tv_usec;
tsec -= t3.tv_usec;
tsec /= 1000000.0;
tsec += t4.tv_sec;
tsec -= t3.tv_sec;
totalsec += tsec;
timing_set(&t4);
totalsec += timing_delta(&t3, &t4);
/* Begin decoding process */
total = 0;
@ -319,7 +314,7 @@ int main (int argc, char **argv) {
}
erasures[numerased] = -1;
gettimeofday(&t3, &tz);
timing_set(&t3);
/* Choose proper decoding method */
if (tech == Reed_Sol_Van || tech == Reed_Sol_R6_Op) {
@ -332,7 +327,7 @@ int main (int argc, char **argv) {
fprintf(stderr, "Not a valid coding technique.\n");
exit(0);
}
gettimeofday(&t4, &tz);
timing_set(&t4);
/* Exit if decoding was unsuccessful */
if (i == -1) {
@ -368,13 +363,7 @@ int main (int argc, char **argv) {
}
n++;
fclose(fp);
tsec = 0.0;
tsec += t4.tv_usec;
tsec -= t3.tv_usec;
tsec /= 1000000.0;
tsec += t4.tv_sec;
tsec -= t3.tv_sec;
totalsec += tsec;
totalsec += timing_delta(&t3, &t4);
}
/* Free allocated memory */
@ -387,15 +376,12 @@ int main (int argc, char **argv) {
free(erased);
/* Stop timing and print time */
gettimeofday(&t2, &tz);
tsec = 0;
tsec += t2.tv_usec;
tsec -= t1.tv_usec;
tsec /= 1000000.0;
tsec += t2.tv_sec;
tsec -= t1.tv_sec;
timing_set(&t2);
tsec = timing_delta(&t1, &t2);
printf("Decoding (MB/sec): %0.10f\n", (((double) origsize)/1024.0/1024.0)/totalsec);
printf("De_Total (MB/sec): %0.10f\n\n", (((double) origsize)/1024.0/1024.0)/tsec);
return 0;
}
void ctrl_bs_handler(int dummy) {

63
Examples/encoder.c

@ -55,6 +55,7 @@ is the file name with "_k#" or "_m#" and then the extension.
(For example, inputfile test.txt would yield file "test_k1.txt".)
*/
#include <assert.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
@ -64,10 +65,12 @@ is the file name with "_k#" or "_m#" and then the extension.
#include <errno.h>
#include <signal.h>
#include <gf_rand.h>
#include <unistd.h>
#include "jerasure.h"
#include "reed_sol.h"
#include "cauchy.h"
#include "liberation.h"
#include "timing.h"
#define N 10
@ -85,8 +88,6 @@ void ctrl_bs_handler(int dummy);
int jfread(void *ptr, int size, int nmembers, FILE *stream)
{
int nd;
int *li, i;
if (stream != NULL) return fread(ptr, size, nmembers, stream);
MOA_Fill_Random_Region(ptr, size);
@ -96,7 +97,6 @@ int jfread(void *ptr, int size, int nmembers, FILE *stream)
int main (int argc, char **argv) {
FILE *fp, *fp2; // file pointers
char *memblock; // reading in file
char *block; // padding file
int size, newsize; // size of file and temp size
struct stat status; // finding file size
@ -105,7 +105,7 @@ int main (int argc, char **argv) {
enum Coding_Technique tech; // coding technique (parameter)
int k, m, w, packetsize; // parameters
int buffersize; // paramter
int i, j; // loop control variables
int i; // loop control variables
int blocksize; // size of k+m files
int total;
int extra;
@ -116,8 +116,6 @@ int main (int argc, char **argv) {
int *matrix;
int *bitmatrix;
int **schedule;
int *erasure;
int *erased;
/* Creation of file name variables */
char temp[5];
@ -127,11 +125,10 @@ int main (int argc, char **argv) {
char *curdir;
/* Timing variables */
struct timeval t1, t2, t3, t4;
struct timezone tz;
struct timing t1, t2, t3, t4;
double tsec;
double totalsec;
struct timeval start, stop;
struct timing start;
/* Find buffersize */
int up, down;
@ -140,7 +137,7 @@ int main (int argc, char **argv) {
signal(SIGQUIT, ctrl_bs_handler);
/* Start timing */
gettimeofday(&t1, &tz);
timing_set(&t1);
totalsec = 0.0;
matrix = NULL;
bitmatrix = NULL;
@ -435,13 +432,15 @@ int main (int argc, char **argv) {
/* Create coding matrix or bitmatrix and schedule */
gettimeofday(&t3, &tz);
timing_set(&t3);
switch(tech) {
case No_Coding:
break;
case Reed_Sol_Van:
matrix = reed_sol_vandermonde_coding_matrix(k, m, w);
break;
case Reed_Sol_R6_Op:
break;
case Cauchy_Orig:
matrix = cauchy_original_coding_matrix(k, m, w);
bitmatrix = jerasure_matrix_to_bitmatrix(k, m, w, matrix);
@ -464,16 +463,13 @@ int main (int argc, char **argv) {
bitmatrix = liber8tion_coding_bitmatrix(k);
schedule = jerasure_smart_bitmatrix_to_schedule(k, m, w, bitmatrix);
break;
case RDP:
case EVENODD:
assert(0);
}
gettimeofday(&start, &tz);
gettimeofday(&t4, &tz);
tsec = 0.0;
tsec += t4.tv_usec;
tsec -= t3.tv_usec;
tsec /= 1000000.0;
tsec += t4.tv_sec;
tsec -= t3.tv_sec;
totalsec += tsec;
timing_set(&start);
timing_set(&t4);
totalsec += timing_delta(&t3, &t4);
@ -504,7 +500,7 @@ int main (int argc, char **argv) {
data[i] = block+(i*blocksize);
}
gettimeofday(&t3, &tz);
timing_set(&t3);
/* Encode according to coding method */
switch(tech) {
case No_Coding:
@ -530,8 +526,11 @@ int main (int argc, char **argv) {
case Liber8tion:
jerasure_schedule_encode(k, m, w, schedule, data, coding, blocksize, packetsize);
break;
case RDP:
case EVENODD:
assert(0);
}
gettimeofday(&t4, &tz);
timing_set(&t4);
/* Write data and encoded data to k+m files */
for (i = 1; i <= k; i++) {
@ -567,13 +566,7 @@ int main (int argc, char **argv) {
}
n++;
/* Calculate encoding time */
tsec = 0.0;
tsec += t4.tv_usec;
tsec -= t3.tv_usec;
tsec /= 1000000.0;
tsec += t4.tv_sec;
tsec -= t3.tv_sec;
totalsec += tsec;
totalsec += timing_delta(&t3, &t4);
}
/* Create metadata file */
@ -597,15 +590,12 @@ int main (int argc, char **argv) {
free(curdir);
/* Calculate rate in MB/sec and print */
gettimeofday(&t2, &tz);
tsec = 0.0;
tsec += t2.tv_usec;
tsec -= t1.tv_usec;
tsec /= 1000000.0;
tsec += t2.tv_sec;
tsec -= t1.tv_sec;
timing_set(&t2);
tsec = timing_delta(&t1, &t2);
printf("Encoding (MB/sec): %0.10f\n", (((double) size)/1024.0/1024.0)/totalsec);
printf("En_Total (MB/sec): %0.10f\n", (((double) size)/1024.0/1024.0)/tsec);
return 0;
}
/* is_prime returns 1 if number if prime, 0 if not prime */
@ -620,6 +610,7 @@ int is_prime(int w) {
else { return 0; }
}
}
assert(0);
}
/* Handles ctrl-\ event */

2
Examples/jerasure_01.c

@ -50,7 +50,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_01 r c w - creates and prints out a matrix in GF(2^w).\n\n");
fprintf(stderr, " Element i,j is equal to 2^(i*c+j)\n");

2
Examples/jerasure_02.c

@ -50,7 +50,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_02 r c w - Converts the matrix of jerasure_01 to a bit matrix.\n");
fprintf(stderr, " \n");

2
Examples/jerasure_03.c

@ -51,7 +51,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_03 k w - Creates a kxk Cauchy matrix in GF(2^w). \n\n");
fprintf(stderr, " k must be < 2^w. Element i,j is 1/(i+(2^w-j-1)). (If that is\n");

2
Examples/jerasure_04.c

@ -51,7 +51,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_04 k w - Performs the analogous bit-matrix operations to jerasure_03.\n\n");
fprintf(stderr, " It converts the matrix to a kw*kw bit matrix and does the same operations.\n");

3
Examples/jerasure_05.c

@ -53,7 +53,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_05 k m w size seed - Does a simple Reed-Solomon coding example in GF(2^w).\n");
fprintf(stderr, " \n");
@ -77,7 +77,6 @@ static void print_data_and_coding(int k, int m, int w, int size,
{
int i, j, x;
int n, sp;
long l;
if(k > m) n = k;
else n = m;

5
Examples/jerasure_06.c

@ -53,7 +53,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_06 k m w packetsize seed\n");
fprintf(stderr, "Does a simple Cauchy Reed-Solomon coding example in GF(2^w).\n");
@ -72,7 +72,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -101,7 +101,6 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
long l;
int k, w, i, j, m, psize, x;
int *matrix, *bitmatrix;
char **data, **coding;

5
Examples/jerasure_07.c

@ -53,7 +53,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_07 k m w seed - Scheduled Cauchy Reed-Solomon coding example in GF(2^w).\n");
fprintf(stderr, " \n");
@ -72,7 +72,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -101,7 +101,6 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
long l;
int k, w, i, j, m;
int *matrix, *bitmatrix;
char **data, **coding, **ptrs;

9
Examples/jerasure_08.c

@ -53,7 +53,7 @@
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
usage(char *s)
static void usage(char *s)
{
fprintf(stderr, "usage: jerasure_08 k w seed - Example schedule cache usage with RAID-6\n");
fprintf(stderr, " \n");
@ -75,7 +75,7 @@ usage(char *s)
exit(1);
}
static print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
static void print_array(char **ptrs, int ndevices, int size, int packetsize, char *label)
{
int i, j, x;
unsigned char *up;
@ -104,10 +104,9 @@ static print_array(char **ptrs, int ndevices, int size, int packetsize, char *la
int main(int argc, char **argv)
{
long l;
int k, w, i, j, m;
int *matrix, *bitmatrix;
char **data, **coding, **ptrs;
char **data, **coding;
int **smart, ***cache;
int *erasures, *erased;
double stats[3];
@ -208,7 +207,7 @@ int main(int argc, char **argv)
printf("<hr>\n");
bzero(coding[0], sizeof(long)*w);
printf("Erased the first coding device:\n\n", m);
printf("Erased the first coding device:\n\n");
printf("<p>\n");
print_array(data, k, sizeof(long)*w, sizeof(long), "D");
printf("<p>\n");