+++ /dev/null
-/code/src/build/*
-/code/test/build/*
-/code/data/src/
-
-*.aux
-*.log
-*.nav
-*.snm
-*.toc
-*.out
--- /dev/null
+#ignore "real" data (way too large)
+data/
To compile source code :
- (mkdir -p (src|test)/build
- cd (src|test)/build
- cmake ..
+ cd build/stage1/src #and then stage2
+ cmake ../../../stage1/src
make
Usage :
void t_pack1()
{
Work_t* work = (Work_t*)malloc(sizeof(Work_t));
- work->inputFileName = "../data/inputTest.bin";
+ work->inputFileName = "../tdata/inputTest.bin";
work->nbSeries = 5;
uint32_t ranks[] =
{
// Hard-coded expected packed work
unsigned char expectedPackedWork[] =
{
- // --> ../data/inputTest.bin
+ // --> ../tdata/inputTest.bin
46,46,47,100,97,116,97,47,105,110,112,117,116,84,101,115,116,46,98,105,110,
- // continue with 256 - strlen("../data/inputTest.bin") zeros...
+ // continue with 256 - strlen("../tdata/inputTest.bin") zeros...
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
// Hard-coded packed work
unsigned char packedWork[] =
{
- // --> ../data/inputTest.bin
+ // --> ../tdata/inputTest.bin
46,46,47,100,97,116,97,47,105,110,112,117,116,84,101,115,116,46,98,105,110,
- // continue with 256 - strlen("../data/inputTest.bin") zeros...
+ // continue with 256 - strlen("../tdata/inputTest.bin") zeros...
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
uint32_t nbSeriesInChunk = 7;
Work_t* work = unpack_work(packedWork, nbSeriesInChunk);
- LUT_ASSERT(strcmp(work->inputFileName, "../data/inputTest.bin") == 0);
+ LUT_ASSERT(strcmp(work->inputFileName, "../tdata/inputTest.bin") == 0);
LUT_ASSERT(work->nbSeries == 5);
uint32_t ranks[] =
{
void t_deserialize1()
{
// decode sample_byCols.bin into the toy dataset (4 customers, 3 sample points)
- const char* ifName = "../data/test/sample_byCols.bin";
+ const char* ifName = "../tdata/test/sample_byCols.bin";
// check 'header'
uint32_t nbSeries = get_nbSeries(ifName);
void t_deserialize2()
{
// decode sample_byRows.bin into the toy dataset (4 customers, 3 sample points)
- const char* ifName = "../data/test/sample_byRows.bin";
+ const char* ifName = "../tdata/test/sample_byRows.bin";
// check 'header'
uint32_t nbSeries = get_nbSeries(ifName);
void t_serialize1()
{
- const char* csvIfName = "../data/test/sample_byCols.csv";
- const char* binaryIfName = "../data/test/sample_byCols.bin";
- const char* tmpBinaryIfName = "../data/test/sample_byCols.tmp.bin";
+ const char* csvIfName = "../tdata/test/sample_byCols.csv";
+ const char* binaryIfName = "../tdata/test/sample_byCols.bin";
+ const char* tmpBinaryIfName = "../tdata/test/sample_byCols.tmp.bin";
// serialize text file into a temporary binary file
serialize_byCols(csvIfName, tmpBinaryIfName, 0);
void t_serialize2()
{
- const char* csvIfName = "../data/test/sample_byRows.csv";
- const char* binaryIfName = "../data/test/sample_byRows.bin";
- const char* tmpBinaryIfName = "../data/test/sample_byRows.tmp.bin";
+ const char* csvIfName = "../tdata/test/sample_byRows.csv";
+ const char* binaryIfName = "../tdata/test/sample_byRows.bin";
+ const char* tmpBinaryIfName = "../tdata/test/sample_byRows.tmp.bin";
// serialize text file into a temporary binary file
serialize_byRows(csvIfName, tmpBinaryIfName, 0);
//integers
void t_utils1()
{
- FILE* file = fopen("../data/test/integers.txt", "rb");
+ FILE* file = fopen("../tdata/test/integers.txt", "rb");
int64_t x;
readInt(file, &x);
LUT_ASSERT(x == 1234);
//reals
void t_utils2()
{
- FILE* file = fopen("../data/test/reals.txt", "rb");
+ FILE* file = fopen("../tdata/test/reals.txt", "rb");
Real x, tol = 1e-10;
readReal(file, &x);
LUT_ASSERT(fabs(x - 1234.056) < tol);
--- /dev/null
+#ignore all files produced by LaTeX compilation
+*.aux
+*.log
+*.nav
+*.snm
+*.toc
+*.out
+*.pdf