aboutsummaryrefslogtreecommitdiff
path: root/core/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/render.c')
-rw-r--r--core/render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/render.c b/core/render.c
index f42e821..463ea06 100644
--- a/core/render.c
+++ b/core/render.c
@@ -16,14 +16,14 @@ void eva_render(sqlite3_context *context, int argc, sqlite3_value **argv) {
(void)argc;
size_t left = (size_t)sqlite3_value_int(argv[0]);
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
left %= MVEC_SIZE;
#endif
size_t px_count = (size_t)sqlite3_value_int(argv[1]);
size_t px_pow = (size_t)sqlite3_value_int(argv[2]);
size_t px_res = 1 << px_pow;
-#if !defined(MVEC_LOOP)
+#if MVEC_LOOP == 0
#if !defined(NDEBUG)
size_t right = left + px_res * px_count;
#endif
@@ -55,7 +55,7 @@ void eva_render(sqlite3_context *context, int argc, sqlite3_value **argv) {
for (size_t j = 0; j < px_res; j++) {
size_t in_coord = left + i * px_res + j;
-#if defined(MVEC_LOOP)
+#if MVEC_LOOP == 1
in_coord %= MVEC_SIZE;
#endif
out[i] += eva[in_coord];