1
0
mirror of https://github.com/pgvector/pgvector.git synced 2026-10-23 10:48:54 +03:00

Improved includes [skip ci]

This commit is contained in:
Andrew Kane
2026-07-28 18:38:27 -07:00
parent d631064394
commit bf8bbf34bf
5 changed files with 17 additions and 8 deletions

View File

@@ -27,10 +27,6 @@
#include "parser/scansup.h"
#endif
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif
#if PG_VERSION_NUM >= 190000
#define palloc_array_checked(type, count) ((type *) palloc_array(type, count))
#else

View File

@@ -5,6 +5,13 @@
#include <float.h>
#include "fmgr.h"
#include "utils/palloc.h"
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif
/* We use two types of dispatching: intrinsics and target_clones */
/* TODO Move to better place */
#ifndef DISABLE_DISPATCH

View File

@@ -1,6 +1,9 @@
#ifndef SPARSEVEC_H
#define SPARSEVEC_H
#include "fmgr.h"
#include "utils/palloc.h"
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif

View File

@@ -30,10 +30,6 @@
#include "parser/scansup.h"
#endif
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif
#if PG_VERSION_NUM >= 190000
#define palloc_array_checked(type, count) ((type *) palloc_array(type, count))
#else

View File

@@ -1,6 +1,13 @@
#ifndef VECTOR_H
#define VECTOR_H
#include "fmgr.h"
#include "utils/palloc.h"
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif
#define VECTOR_MAX_DIM 16000
#define VECTOR_SIZE(_dim) add_size(offsetof(Vector, x), mul_size(sizeof(float), _dim))