From d516c9bd3f1424f92cc55d6e2523801dfe791195 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 25 Apr 2024 19:49:21 -0700 Subject: [PATCH] Improved code [skip ci] --- src/bitutils.c | 5 +++++ src/bitutils.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/bitutils.c b/src/bitutils.c index 3025d7c..f11734b 100644 --- a/src/bitutils.c +++ b/src/bitutils.c @@ -1,8 +1,13 @@ #include "postgres.h" #include "bitutils.h" +#include "halfvec.h" /* for USE_DISPATCH and USE_TARGET_CLONES */ #include "port/pg_bitutils.h" +#if defined(USE_DISPATCH) +#define BIT_DISPATCH +#endif + #ifdef BIT_DISPATCH #include diff --git a/src/bitutils.h b/src/bitutils.h index db362e1..b834190 100644 --- a/src/bitutils.h +++ b/src/bitutils.h @@ -8,12 +8,6 @@ #error "Requires PostgreSQL 12+" #endif -#include "halfvec.h" /* for USE_DISPATCH and USE_TARGET_CLONES */ - -#if defined(USE_DISPATCH) -#define BIT_DISPATCH -#endif - extern uint64 (*BitHammingDistance) (uint32 bytes, unsigned char *ax, unsigned char *bx, uint64 distance); extern double (*BitJaccardDistance) (uint32 bytes, unsigned char *ax, unsigned char *bx, uint64 ab, uint64 aa, uint64 bb);