PostgreSQL Source Code  git master
cubedata.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NDBOX
 

Macros

#define CUBE_MAX_DIM   (100)
 
#define POINT_BIT   0x80000000
 
#define DIM_MASK   0x7fffffff
 
#define IS_POINT(cube)   ( ((cube)->header & POINT_BIT) != 0 )
 
#define SET_POINT_BIT(cube)   ( (cube)->header |= POINT_BIT )
 
#define DIM(cube)   ( (cube)->header & DIM_MASK )
 
#define SET_DIM(cube, _dim)   ( (cube)->header = ((cube)->header & ~DIM_MASK) | (_dim) )
 
#define LL_COORD(cube, i)   ( (cube)->x[i] )
 
#define UR_COORD(cube, i)   ( IS_POINT(cube) ? (cube)->x[i] : (cube)->x[(i) + DIM(cube)] )
 
#define POINT_SIZE(_dim)   (offsetof(NDBOX, x) + sizeof(double)*(_dim))
 
#define CUBE_SIZE(_dim)   (offsetof(NDBOX, x) + sizeof(double)*(_dim)*2)
 
#define DatumGetNDBOXP(x)   ((NDBOX *) PG_DETOAST_DATUM(x))
 
#define PG_GETARG_NDBOX_P(x)   DatumGetNDBOXP(PG_GETARG_DATUM(x))
 
#define PG_RETURN_NDBOX_P(x)   PG_RETURN_POINTER(x)
 
#define CubeKNNDistanceCoord   15 /* ~> */
 
#define CubeKNNDistanceTaxicab   16 /* <#> */
 
#define CubeKNNDistanceEuclid   17 /* <-> */
 
#define CubeKNNDistanceChebyshev   18 /* <=> */
 

Typedefs

typedef struct NDBOX NDBOX
 

Functions

int cube_yylex (void)
 
void cube_yyerror (NDBOX **result, const char *message) pg_attribute_noreturn()
 
void cube_scanner_init (const char *str)
 
void cube_scanner_finish (void)
 
int cube_yyparse (NDBOX **result)
 

Macro Definition Documentation

◆ CUBE_MAX_DIM

#define CUBE_MAX_DIM   (100)

Definition at line 7 of file cubedata.h.

Referenced by cube_enlarge().

◆ CUBE_SIZE

#define CUBE_SIZE (   _dim)    (offsetof(NDBOX, x) + sizeof(double)*(_dim)*2)

◆ CubeKNNDistanceChebyshev

#define CubeKNNDistanceChebyshev   18 /* <=> */

Definition at line 60 of file cubedata.h.

Referenced by g_cube_distance().

◆ CubeKNNDistanceCoord

#define CubeKNNDistanceCoord   15 /* ~> */

Definition at line 57 of file cubedata.h.

Referenced by g_cube_distance().

◆ CubeKNNDistanceEuclid

#define CubeKNNDistanceEuclid   17 /* <-> */

Definition at line 59 of file cubedata.h.

Referenced by g_cube_distance().

◆ CubeKNNDistanceTaxicab

#define CubeKNNDistanceTaxicab   16 /* <#> */

Definition at line 58 of file cubedata.h.

Referenced by g_cube_distance().

◆ DatumGetNDBOXP

#define DatumGetNDBOXP (   x)    ((NDBOX *) PG_DETOAST_DATUM(x))

◆ DIM

◆ DIM_MASK

#define DIM_MASK   0x7fffffff

Definition at line 38 of file cubedata.h.

◆ IS_POINT

#define IS_POINT (   cube)    ( ((cube)->header & POINT_BIT) != 0 )

◆ LL_COORD

◆ PG_GETARG_NDBOX_P

◆ PG_RETURN_NDBOX_P

#define PG_RETURN_NDBOX_P (   x)    PG_RETURN_POINTER(x)

◆ POINT_BIT

#define POINT_BIT   0x80000000

Definition at line 37 of file cubedata.h.

◆ POINT_SIZE

#define POINT_SIZE (   _dim)    (offsetof(NDBOX, x) + sizeof(double)*(_dim))

◆ SET_DIM

#define SET_DIM (   cube,
  _dim 
)    ( (cube)->header = ((cube)->header & ~DIM_MASK) | (_dim) )

◆ SET_POINT_BIT

#define SET_POINT_BIT (   cube)    ( (cube)->header |= POINT_BIT )

◆ UR_COORD

Typedef Documentation

◆ NDBOX

Function Documentation

◆ cube_scanner_finish()

void cube_scanner_finish ( void  )

Referenced by cube_in().

◆ cube_scanner_init()

void cube_scanner_init ( const char *  str)

Referenced by cube_in().

◆ cube_yyerror()

void cube_yyerror ( NDBOX **  result,
const char *  message 
)

Referenced by cube_in().

◆ cube_yylex()

int cube_yylex ( void  )

◆ cube_yyparse()

int cube_yyparse ( NDBOX **  result)

Referenced by cube_in().