aboutsummaryrefslogtreecommitdiff
path: root/cbits/arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'cbits/arith.c')
-rw-r--r--cbits/arith.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cbits/arith.c b/cbits/arith.c
index 3c5d846..002910c 100644
--- a/cbits/arith.c
+++ b/cbits/arith.c
@@ -8,7 +8,7 @@ typedef int32_t i32;
typedef int64_t i64;
#define COMM_OP(name, op, typ) \
- void oxarop_ ## name ## _ ## typ ## _sv(i64 n, typ *out, typ x, typ *y) { \
+ void oxarop_ ## name ## _ ## typ ## _sv(i64 n, typ *out, typ x, const typ *y) { \
for (i64 i = 0; i < n; i++) out[i] = x op y[i]; \
} \
void oxarop_ ## name ## _ ## typ ## _vv(i64 n, typ *out, const typ *x, const typ *y) { \
@@ -17,12 +17,12 @@ typedef int64_t i64;
#define NONCOMM_OP(name, op, typ) \
COMM_OP(name, op, typ) \
- void oxarop_ ## name ## _ ## typ ## _vs(i64 n, typ *out, typ *x, typ y) { \
+ void oxarop_ ## name ## _ ## typ ## _vs(i64 n, typ *out, const typ *x, typ y) { \
for (i64 i = 0; i < n; i++) out[i] = x[i] op y; \
}
#define UNARY_OP(name, op, typ) \
- void oxarop_ ## name ## _ ## typ(i64 n, typ *out, typ *x) { \
+ void oxarop_ ## name ## _ ## typ(i64 n, typ *out, const typ *x) { \
for (i64 i = 0; i < n; i++) out[i] = op(x[i]); \
}