aboutsummaryrefslogtreecommitdiff
path: root/cbits
diff options
context:
space:
mode:
Diffstat (limited to 'cbits')
-rw-r--r--cbits/arith.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cbits/arith.c b/cbits/arith.c
index f19b01e..1066463 100644
--- a/cbits/arith.c
+++ b/cbits/arith.c
@@ -20,6 +20,8 @@
// Shorter names, due to CPP used both in function names and in C types.
+typedef int8_t i8;
+typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
@@ -248,6 +250,8 @@ void oxarrays_stats_print_all(void) {
#define GEN_ABS(x) \
_Generic((x), \
+ i8: abs, \
+ i16: abs, \
int: abs, \
long: labs, \
long long: llabs, \
@@ -738,7 +742,7 @@ enum redop_tag_t {
* Generate all the functions *
*****************************************************************************/
-#define INT_TYPES_XLIST X(i32) X(i64)
+#define INT_TYPES_XLIST X(i8) X(i16) X(i32) X(i64)
#define FLOAT_TYPES_XLIST X(double) X(float)
#define NUM_TYPES_XLIST INT_TYPES_XLIST FLOAT_TYPES_XLIST