diff --git a/time.c b/benchmarks/time.c similarity index 96% rename from time.c rename to benchmarks/time.c index a2b827a..e5159aa 100644 --- a/time.c +++ b/benchmarks/time.c @@ -7,6 +7,8 @@ /* This program compares the lina_transpose ** implementation against the naive implementation. +** Build it with: +** $ gcc time.c lina.c -o time -Wall -Wextra -O3 */ #define check assert diff --git a/build.sh b/build.sh index 196d641..c8d3ed7 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,2 @@ -gcc test.c lina.c -o test -Wall -Wextra -g -gcc test2.c lina.c -o test2 -Wall -Wextra -g -gcc time.c lina.c -o time -Wall -Wextra -O3 \ No newline at end of file +gcc tests/test.c src/lina.c -o test -Wall -Wextra -g -Isrc/ +gcc tests/test2.c src/lina.c -o test2 -Wall -Wextra -g -Isrc/ diff --git a/lina.c b/src/lina.c similarity index 99% rename from lina.c rename to src/lina.c index e173195..b2fd407 100644 --- a/lina.c +++ b/src/lina.c @@ -191,7 +191,7 @@ static int scanValue(FILE *fp, char *buffer, int max_length, char first, char *f double *lina_loadMatrixFromStream(FILE *fp, int *width, int *height, char **error) { assert(width != NULL && height != NULL); - + if(fp == NULL) fp = stdin; diff --git a/lina.h b/src/lina.h similarity index 100% rename from lina.h rename to src/lina.h diff --git a/test.c b/tests/test.c similarity index 100% rename from test.c rename to tests/test.c diff --git a/test2.c b/tests/test2.c similarity index 100% rename from test2.c rename to tests/test2.c