Clean-up and use of aligned buffers in Test/

All of the new tests appear to pass.
master
Kevin Greenan 2013-11-18 22:17:05 -08:00
parent 07de6b80f8
commit 5eb73fa7d1
39 changed files with 66 additions and 42 deletions

Binary file not shown.

0
Examples/cauchy_01.c Executable file → Normal file
View File

0
Examples/cauchy_02.c Executable file → Normal file
View File

0
Examples/cauchy_03.c Executable file → Normal file
View File

0
Examples/cauchy_04.c Executable file → Normal file
View File

0
Examples/decoder.c Executable file → Normal file
View File

0
Examples/encoder.c Executable file → Normal file
View File

0
Examples/jerasure_01.c Executable file → Normal file
View File

0
Examples/jerasure_02.c Executable file → Normal file
View File

0
Examples/jerasure_03.c Executable file → Normal file
View File

0
Examples/jerasure_04.c Executable file → Normal file
View File

0
Examples/jerasure_05.c Executable file → Normal file
View File

0
Examples/jerasure_06.c Executable file → Normal file
View File

0
Examples/jerasure_07.c Executable file → Normal file
View File

0
Examples/jerasure_08.c Executable file → Normal file
View File

0
Examples/liberation_01.c Executable file → Normal file
View File

77
Examples/makefile Executable file → Normal file
View File

@ -109,81 +109,80 @@ galois.h: ../galois.h
galois.c: ../galois.c
rm -f galois.c ; cp ../galois.c . ; chmod 0444 galois.c
galois.o ${LIBDIR}/gf_complete.a: galois.h
jerasure.o: jerasure.h galois.h
jerasure_01.o: galois.h jerasure.h
jerasure_01: jerasure_01.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_01 jerasure_01.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_01: jerasure_01.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_01 jerasure_01.o jerasure.o galois.o -lgf_complete
jerasure_02.o: galois.h jerasure.h
jerasure_02: jerasure_02.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_02 jerasure_02.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_02: jerasure_02.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_02 jerasure_02.o jerasure.o galois.o -lgf_complete
jerasure_03.o: galois.h jerasure.h
jerasure_03: jerasure_03.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_03 jerasure_03.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_03: jerasure_03.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_03 jerasure_03.o jerasure.o galois.o -lgf_complete
jerasure_04.o: galois.h jerasure.h
jerasure_04: jerasure_04.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_04 jerasure_04.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_04: jerasure_04.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_04 jerasure_04.o jerasure.o galois.o -lgf_complete
jerasure_05.o: galois.h jerasure.h
jerasure_05: jerasure_05.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_05 jerasure_05.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_05: jerasure_05.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_05 jerasure_05.o jerasure.o galois.o -lgf_complete
jerasure_06.o: galois.h jerasure.h
jerasure_06: jerasure_06.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_06 jerasure_06.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_06: jerasure_06.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_06 jerasure_06.o jerasure.o galois.o -lgf_complete
jerasure_07.o: galois.h jerasure.h
jerasure_07: jerasure_07.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_07 jerasure_07.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_07: jerasure_07.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_07 jerasure_07.o jerasure.o galois.o -lgf_complete
jerasure_08.o: galois.h jerasure.h
jerasure_08: jerasure_08.o galois.o ${LIBDIR}/gf_complete.a jerasure.o
$(CC) $(CFLAGS) -o jerasure_08 jerasure_08.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
jerasure_08: jerasure_08.o galois.o jerasure.o
$(CC) $(CFLAGS) -o jerasure_08 jerasure_08.o jerasure.o galois.o -lgf_complete
reed_sol_01.o: galois.h reed_sol.h jerasure.h
reed_sol_01: reed_sol_01.o galois.o ${LIBDIR}/gf_complete.a jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_01 reed_sol_01.o reed_sol.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
reed_sol_01: reed_sol_01.o galois.o jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_01 reed_sol_01.o reed_sol.o jerasure.o galois.o -lgf_complete
reed_sol_02.o: galois.h reed_sol.h jerasure.h
reed_sol_02: reed_sol_02.o galois.o ${LIBDIR}/gf_complete.a jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_02 reed_sol_02.o reed_sol.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
reed_sol_02: reed_sol_02.o galois.o jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_02 reed_sol_02.o reed_sol.o jerasure.o galois.o -lgf_complete
reed_sol_03.o: galois.h reed_sol.h jerasure.h
reed_sol_03: reed_sol_03.o galois.o ${LIBDIR}/gf_complete.a jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_03 reed_sol_03.o reed_sol.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
reed_sol_03: reed_sol_03.o galois.o jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_03 reed_sol_03.o reed_sol.o jerasure.o galois.o -lgf_complete
reed_sol_04.o: galois.h reed_sol.h jerasure.h
reed_sol_04: reed_sol_04.o galois.o ${LIBDIR}/gf_complete.a jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_04 reed_sol_04.o reed_sol.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
reed_sol_04: reed_sol_04.o galois.o jerasure.o reed_sol.o
$(CC) $(CFLAGS) -o reed_sol_04 reed_sol_04.o reed_sol.o jerasure.o galois.o -lgf_complete
cauchy_01.o: galois.h cauchy.h jerasure.h
cauchy_01: cauchy_01.o galois.o ${LIBDIR}/gf_complete.a jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_01 cauchy_01.o cauchy.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
cauchy_01: cauchy_01.o galois.o jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_01 cauchy_01.o cauchy.o jerasure.o galois.o -lgf_complete
cauchy_02.o: galois.h cauchy.h jerasure.h
cauchy_02: cauchy_02.o galois.o ${LIBDIR}/gf_complete.a jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_02 cauchy_02.o cauchy.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
cauchy_02: cauchy_02.o galois.o jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_02 cauchy_02.o cauchy.o jerasure.o galois.o -lgf_complete
cauchy_03.o: galois.h cauchy.h jerasure.h
cauchy_03: cauchy_03.o galois.o ${LIBDIR}/gf_complete.a jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_03 cauchy_03.o cauchy.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
cauchy_03: cauchy_03.o galois.o jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_03 cauchy_03.o cauchy.o jerasure.o galois.o -lgf_complete
cauchy_04.o: galois.h cauchy.h jerasure.h
cauchy_04: cauchy_04.o galois.o ${LIBDIR}/gf_complete.a jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_04 cauchy_04.o cauchy.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
cauchy_04: cauchy_04.o galois.o jerasure.o cauchy.o
$(CC) $(CFLAGS) -o cauchy_04 cauchy_04.o cauchy.o jerasure.o galois.o -lgf_complete
liberation_01.o: galois.h liberation.h jerasure.h
liberation_01: liberation_01.o galois.o ${LIBDIR}/gf_complete.a jerasure.o liberation.o
$(CC) $(CFLAGS) -o liberation_01 liberation_01.o liberation.o jerasure.o galois.o ${LIBDIR}/gf_complete.a
liberation_01: liberation_01.o galois.o jerasure.o liberation.o
$(CC) $(CFLAGS) -o liberation_01 liberation_01.o liberation.o jerasure.o galois.o -lgf_complete
encoder.o: galois.h liberation.h jerasure.h reed_sol.h cauchy.h
encoder: encoder.o galois.o ${LIBDIR}/gf_complete.a jerasure.o liberation.o reed_sol.o cauchy.o
$(CC) $(CFLAGS) -o encoder encoder.o liberation.o jerasure.o galois.o ${LIBDIR}/gf_complete.a reed_sol.o cauchy.o
encoder: encoder.o galois.o jerasure.o liberation.o reed_sol.o cauchy.o
$(CC) $(CFLAGS) -o encoder encoder.o liberation.o jerasure.o galois.o reed_sol.o cauchy.o -lgf_complete
decoder.o: galois.h liberation.h jerasure.h reed_sol.h cauchy.h
decoder: decoder.o galois.o ${LIBDIR}/gf_complete.a jerasure.o liberation.o reed_sol.o cauchy.o
$(CC) $(CFLAGS) -o decoder decoder.o liberation.o jerasure.o galois.o ${LIBDIR}/gf_complete.a reed_sol.o cauchy.o
decoder: decoder.o galois.o jerasure.o liberation.o reed_sol.o cauchy.o
$(CC) $(CFLAGS) -o decoder decoder.o liberation.o jerasure.o galois.o reed_sol.o cauchy.o -lgf_complete

0
Examples/reed_sol_01.c Executable file → Normal file
View File

0
Examples/reed_sol_02.c Executable file → Normal file
View File

0
Examples/reed_sol_03.c Executable file → Normal file
View File

0
Examples/reed_sol_04.c Executable file → Normal file
View File

3
License.txt Executable file → Normal file
View File

@ -1,6 +1,9 @@
Copyright (c) 2011, James S. Plank
All rights reserved.
Revision 2.0
Nov, 18 2013 (Kevin Greenan and James S. Plank)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

0
README.nd Executable file → Normal file
View File

0
README.txt Executable file → Normal file
View File

0
Test/makefile Executable file → Normal file
View File

13
Test/reed_sol_test_01.c Executable file → Normal file
View File

@ -59,7 +59,18 @@ POSSIBILITY OF SUCH DAMAGE.
#define BUFSIZE 4096
#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
static void *malloc16(int size) {
void *mem = malloc(size+16+sizeof(void*));
void **ptr = (void**)((long)(mem+16+sizeof(void*)) & ~(15));
ptr[-1] = mem;
return ptr;
}
static void free16(void *ptr) {
free(((void**)ptr)[-1]);
}
#define talloc(type, num) (type *) malloc16(sizeof(type)*(num))
usage(char *s)
{

13
Test/reed_sol_test_02.c Executable file → Normal file
View File

@ -57,7 +57,18 @@ POSSIBILITY OF SUCH DAMAGE.
#include "jerasure.h"
#include "reed_sol.h"
#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
static void *malloc16(int size) {
void *mem = malloc(size+16+sizeof(void*));
void **ptr = (void**)((long)(mem+16+sizeof(void*)) & ~(15));
ptr[-1] = mem;
return ptr;
}
static void free16(void *ptr) {
free(((void**)ptr)[-1]);
}
#define talloc(type, num) (type *) malloc16(sizeof(type)*(num))
void
timer_start (double *t)

0
cauchy.c Executable file → Normal file
View File

0
cauchy.h Executable file → Normal file
View File

0
cauchy_best_r6.c Executable file → Normal file
View File

0
galois.c Executable file → Normal file
View File

0
galois.h Executable file → Normal file
View File

0
jerasure.c Executable file → Normal file
View File

0
jerasure.h Executable file → Normal file
View File

0
liberation.c Executable file → Normal file
View File

0
liberation.h Executable file → Normal file
View File

2
makefile Executable file → Normal file
View File

@ -70,7 +70,7 @@ lib/libJerasure.so: lib/libJerasure.so.0
lib/libJerasure.so.0: lib $(OBJS)
$(CC) $(LIBARGS) \
-o lib/libJerasure.so.0 $(OBJS) ${LIBDIR}/gf_complete.a
-o lib/libJerasure.so.0 $(OBJS) -lgf_complete
install: lib/libJerasure.so
cp -P lib/libJerasure.so* ${LIBDIR}

0
reed_sol.c Executable file → Normal file
View File

0
reed_sol.h Executable file → Normal file
View File