summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2021-03-01 14:41:35 +0200
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2021-03-01 14:41:35 +0200
commitb3072e146b4edd4a2422cee758aa341b0638491d (patch)
tree6860f978b265d7427b92176da99b9057a9c17360
parentd249b69a55f9bf1f3a97627f9cc26bb1cdf673b5 (diff)
downloadalgos-ld1-b3072e146b4edd4a2422cee758aa341b0638491d.tar.gz
algos-ld1-b3072e146b4edd4a2422cee758aa341b0638491d.tar.bz2
algos-ld1-b3072e146b4edd4a2422cee758aa341b0638491d.zip
now able to work with 8-bit data!
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
-rw-r--r--meson_options.txt2
-rw-r--r--src/defs.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/meson_options.txt b/meson_options.txt
index ab26488..52d535b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,6 @@ option('data-signed',
description : 'Switch whether to use signed data type')
option('data-bitness',
type : 'combo',
- choices : ['64', '32', '16'],
+ choices : ['64', '32', '16', '8'],
value : '64',
description : 'Size of a data entry to use, in bits')
diff --git a/src/defs.h b/src/defs.h
index faaecd8..5d632c3 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -23,7 +23,13 @@
goto l;\
}} while (0);
-#if entry_field_size == 16
+#if entry_field_size == 8
+# ifdef entry_field_signed
+ typedef int8_t field;
+# else
+ typedef uint8_t field;
+# endif
+#elif entry_field_size == 16
# ifdef entry_field_signed
typedef int16_t field;
# else