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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user