Changeset: 9b463457cc4d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b463457cc4d
Modified Files:
monetdb5/modules/mal/bitcandidates.c
Branch: compressedcandidates
Log Message:
Make bitvector TYPE_msk aware
diffs (36 lines):
diff --git a/monetdb5/modules/mal/bitcandidates.c
b/monetdb5/modules/mal/bitcandidates.c
--- a/monetdb5/modules/mal/bitcandidates.c
+++ b/monetdb5/modules/mal/bitcandidates.c
@@ -13,8 +13,6 @@
#include "mal_interpreter.h"
#include "sys/param.h"
-#define bits 64 /* using BYTEs to represent the bitvector */
-
str
BCLcompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
{
@@ -38,12 +36,12 @@ BCLcompress(Client cntxt, MalBlkPtr mb,
first = *(p);
last = *(q-1);
- comp = (last-first)/bits + 2; // at least 2 oids to avoid trivial
properties set by BBPkeepref
+ comp = (last-first)/sizeof(msk) + 2; // at least 2 oids to avoid
trivial properties set by BBPkeepref
#ifdef _DEBUG_BITCANDIDATES_
fprintf(stderr,"# BLCcompress base "BUNFMT" first "BUNFMT" range "
BUNFMT" count "BUNFMT" vector " BUNFMT"\n", b->tseqbase, first, last,
BATcount(b), comp);
#endif
- bn = COLnew(0, TYPE_oid, comp, TRANSIENT);
+ bn = COLnew(0, TYPE_msk, comp, TRANSIENT);
if( bn == NULL)
throw(MAL,"compress",MAL_MALLOC_FAIL);
/* zap the bitvector */
@@ -95,7 +93,7 @@ BCLdecompress(Client cntxt, MalBlkPtr mb
fprintf(stderr,"#decompress %d base "OIDFMT","OIDFMT"\n",
b->batCacheid, b->hseqbase,b->tseqbase);
#endif
- limit= BATcount(b) * bits;
+ limit= BATcount(b) * sizeof(msk);
bn = COLnew(0, TYPE_oid, limit, TRANSIENT);
if ( bn == 0)
throw(MAL,"decompress",MAL_MALLOC_FAIL);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list