Fix issue with tgen-marray

This commit is contained in:
Patrick Pelissier committed 2017-02-18 18:55:08 +01:00
1 parent 8e9d20ba1a
commit 87b46fe284
2 files changed
+7 -4

No files matched your search

+2 -2
View File
@@ -53,10 +53,10 @@ bitset:
$(CC) $(CFLAGS) $(CPPFLAGS) -g $(COVERAGE_CFLAGS) test-mbitset.c -lgmp -o $(EXE) && $(VALGRIND) $(EXE)
gene-list:
$(CC) $(CFLAGS) $(CPPFLAGS)-O3 -DNDEBUG -S tgen-mlist.c && less tgen-mlist.s
$(CC) $(CFLAGS) $(CPPFLAGS) -O3 -DNDEBUG -S tgen-mlist.c && less tgen-mlist.s
gene-array:
$(CC) $(CFLAGS) $(CPPFLAGS)-O3 -DNDEBUG -S tgen-marray.c && less tgen-marray.s
$(CC) $(CFLAGS) $(CPPFLAGS) -O3 -DNDEBUG -S tgen-marray.c && less tgen-marray.s
clean:
$(RM) $(EXE) *.s *~ *.o ./a.dat
+5 -2
View File
@@ -23,11 +23,14 @@
#include "m-array.h"
ARRAY_DEF(unsigned int, uint)
ARRAY_DEF(uint, unsigned int)
unsigned int add_two(const array_uint_t tab, size_t i, size_t j);
void size_to_exactly(array_uint_t tab, size_t n);
unsigned int add_two(const array_uint_t tab, size_t i, size_t j)
{
return *array_uint_cref(tab, i) + *array_uint_cref(tab, j);
return *array_uint_cget(tab, i) + *array_uint_cget(tab, j);
}
void size_to_exactly(array_uint_t tab, size_t n)