From 4a7d93f24b2dce3a41d75da752aa1e41bfc62214 Mon Sep 17 00:00:00 2001 From: Avril Date: Sun, 29 Nov 2020 21:10:44 +0000 Subject: [PATCH] update makefile --- Makefile | 7 ++++++- include/shuffle.hpp | 1 + include/shuffle3.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7f4f4e..900aa11 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,12 @@ INCLUDE = include PROJECT=shuffle3 -COMMON_FLAGS = -Wall -pedantic $(addprefix -I,$(INCLUDE)) -fno-strict-aliasing +# Currently supported: +# _FS_SPILL_BUFFER: Use file backed buffer instead of memory backed one for unshuffling. See `shuffle3.h`. +# DEBUG: Pretend we're building a debug release even though we're not. Will enable additional output messages and may interfere with some optimisations +FEATURE_FLAGS?= + +COMMON_FLAGS = $(addprefix -D,$(FEATURE_FLAGS)) -Wall -pedantic $(addprefix -I,$(INCLUDE)) -fno-strict-aliasing OPT_FLAGS?= -march=native -fgraphite -fopenmp -floop-parallelize-all -ftree-parallelize-loops=4 \ -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block \ diff --git a/include/shuffle.hpp b/include/shuffle.hpp index 7486bef..ba651ad 100644 --- a/include/shuffle.hpp +++ b/include/shuffle.hpp @@ -29,6 +29,7 @@ namespace rng { if(!span.size()) return; #ifdef _FS_SPILL_BUFFER +#warning "_FS_SPILL_BUFFER is still experimental" file_vector rng_values(span.size()); #else std::vector rng_values(span.size()); diff --git a/include/shuffle3.h b/include/shuffle3.h index af16299..f3ad0b2 100644 --- a/include/shuffle3.h +++ b/include/shuffle3.h @@ -18,6 +18,8 @@ extern "C" { //#define _FS_SPILL_BUFFER /* Use a file-backed buffer when unshuffling in cases of too high memory usage. Will cause massive slowdowns but can stop OOMs when unshuffling large files */ +// + extern const char* _prog_name; #ifdef __cplusplus