Changeset: 4eeaa77c5b28 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4eeaa77c5b28 Modified Files: gdk/gdk.h Branch: Oct2020 Log Message:
Introduce macro to easily access BBP record for given bat id. diffs (33 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1334,17 +1334,18 @@ gdk_export bat BBPlimit; gdk_export BBPrec *BBP[N_BBPINIT]; /* fast defines without checks; internal use only */ -#define BBP_cache(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].cache -#define BBP_logical(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].logical -#define BBP_bak(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].bak -#define BBP_next(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].next -#define BBP_physical(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].physical -#define BBP_options(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].options -#define BBP_desc(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].desc -#define BBP_refs(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].refs -#define BBP_lrefs(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].lrefs -#define BBP_status(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].status -#define BBP_pid(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)].pid +#define BBP_record(i) BBP[(i)>>BBPINITLOG][(i)&(BBPINIT-1)] +#define BBP_cache(i) BBP_record(i).cache +#define BBP_logical(i) BBP_record(i).logical +#define BBP_bak(i) BBP_record(i).bak +#define BBP_next(i) BBP_record(i).next +#define BBP_physical(i) BBP_record(i).physical +#define BBP_options(i) BBP_record(i).options +#define BBP_desc(i) BBP_record(i).desc +#define BBP_refs(i) BBP_record(i).refs +#define BBP_lrefs(i) BBP_record(i).lrefs +#define BBP_status(i) BBP_record(i).status +#define BBP_pid(i) BBP_record(i).pid #define BATgetId(b) BBP_logical((b)->batCacheid) #define BBPvalid(i) (BBP_logical(i) != NULL && *BBP_logical(i) != '.') _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list