Changeset: 7da3fc43b22c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7da3fc43b22c Modified Files: monetdb5/modules/mosaic/mosaic.c monetdb5/modules/mosaic/mosaic.h monetdb5/modules/mosaic/mosaic_calendar.c monetdb5/modules/mosaic/mosaic_delta.c monetdb5/modules/mosaic/mosaic_dictionary.c monetdb5/modules/mosaic/mosaic_frame.c monetdb5/modules/mosaic/mosaic_hdr.c monetdb5/modules/mosaic/mosaic_linear.c monetdb5/modules/mosaic/mosaic_prefix.c monetdb5/modules/mosaic/mosaic_raw.c monetdb5/modules/mosaic/mosaic_runlength.c Branch: mosaic Log Message:
remove obsolete elm member. diffs (255 lines): diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c --- a/monetdb5/modules/mosaic/mosaic.c +++ b/monetdb5/modules/mosaic/mosaic.c @@ -375,7 +375,7 @@ MOScompressInternal(Client cntxt, bat *b // initialize the non-compressed read pointer task->src = Tloc(bsrc, 0); - task->elm = BATcount(bsrc); + task->stop = BATcount(bsrc); task->start = 0; task->stop = BATcount(bsrc); task->timer = GDKusec(); @@ -1190,11 +1190,11 @@ MOSjoin(Client cntxt, MalBlkPtr mb, MalS if ( bl->tmosaic){ MOSinit(task,bl); - //task->elm = BATcount(br); + //task->stop = BATcount(br); //task->src= Tloc(br,0); } else { MOSinit(task,br); - //task->elm = BATcount(bl); + //task->stop = BATcount(bl); //task->src= Tloc(bl,0); swapped=1; } @@ -1207,10 +1207,10 @@ MOSjoin(Client cntxt, MalBlkPtr mb, MalS MOSinitializeScan(cntxt,task,startblk,stopblk); if ( bl->tmosaic){ - task->elm = BATcount(br); + task->stop = BATcount(br); task->src= Tloc(br,0); } else { - task->elm = BATcount(bl); + task->stop = BATcount(bl); task->src= Tloc(bl,0); } // loop thru all the chunks and collect the results diff --git a/monetdb5/modules/mosaic/mosaic.h b/monetdb5/modules/mosaic/mosaic.h --- a/monetdb5/modules/mosaic/mosaic.h +++ b/monetdb5/modules/mosaic/mosaic.h @@ -158,7 +158,6 @@ typedef struct MOSTASK{ BAT *bsrc; // target column to extended with compressed heap - BUN elm; // number of elements left to be compress char *src; // read pointer into source //BAT *index; // collection of unique elements //BAT *freq; // frequency of these elements diff --git a/monetdb5/modules/mosaic/mosaic_calendar.c b/monetdb5/modules/mosaic/mosaic_calendar.c --- a/monetdb5/modules/mosaic/mosaic_calendar.c +++ b/monetdb5/modules/mosaic/mosaic_calendar.c @@ -33,7 +33,7 @@ MOSadvance_calendar(Client cntxt, MOStas assert(cnt > 0); task->start += (oid) cnt; - task->stop = task->elm; + task->stop = task->stop; bytes = (long) (cnt * task->hdr->bits)/8 + (((cnt * task->hdr->bits) %8) != 0); task->blk = (MosaicBlk) (((char*) dst) + wordaligned(bytes, int)); } @@ -575,7 +575,7 @@ MOSprojection_calendar(Client cntxt, MO BitVector base = (BitVector) MOScodevector(task);\ w = (TPE*) task->src;\ limit= MOSgetCnt(task->blk);\ - for( o=0, n= task->elm; n-- > 0; o++,w++ ){\ + for( o=0, n= task->stop; n-- > 0; o++,w++ ){\ for(oo = task->start,i=0; i < limit; i++,oo++){\ j= getBitVector(base,i,(int) hdr->bits); \ if ( *w == (task->hdr->dict.val##TPE[(j>>MASKBITS) & task->hdr->mask] | (j & MASKDAY))){\ diff --git a/monetdb5/modules/mosaic/mosaic_delta.c b/monetdb5/modules/mosaic/mosaic_delta.c --- a/monetdb5/modules/mosaic/mosaic_delta.c +++ b/monetdb5/modules/mosaic/mosaic_delta.c @@ -25,7 +25,7 @@ MOSadvance_delta(Client cntxt, MOStask t (void) cntxt; task->start += MOSgetCnt(blk); - task->stop = task->elm; + task->stop = task->stop; switch(task->type){ case TYPE_sht: task->blk = (MosaicBlk)( ((char*) blk)+ wordaligned(sizeof(sht) + MosaicBlkSize + MOSgetCnt(blk)-1,sht)); break ; case TYPE_int: task->blk = (MosaicBlk)( ((char*) blk)+ wordaligned(sizeof(int) + MosaicBlkSize + MOSgetCnt(blk)-1,int)); break ; @@ -709,7 +709,7 @@ MOSprojection_delta(Client cntxt, MOSta v = (bte*) (((char*) task->blk) + MosaicBlkSize + sizeof(int));\ for(oo= (oid) first; first < last; first++, base += *v,v++, oo++){\ w = (TPE*) task->src;\ - for(n = task->elm, o = 0; n -- > 0; w++,o++)\ + for(n = task->stop, o = 0; n -- > 0; w++,o++)\ if ( *w == base){\ if( BUNappend(task->lbat, &oo, false) != GDK_SUCCEED ||\ BUNappend(task->rbat, &o, false) !=GDK_SUCCEED) \ diff --git a/monetdb5/modules/mosaic/mosaic_dictionary.c b/monetdb5/modules/mosaic/mosaic_dictionary.c --- a/monetdb5/modules/mosaic/mosaic_dictionary.c +++ b/monetdb5/modules/mosaic/mosaic_dictionary.c @@ -34,7 +34,7 @@ MOSadvance_dictionary(Client cntxt, MOSt assert(cnt > 0); task->start += (oid) cnt; - task->stop = task->elm; + task->stop = task->stop; bytes = (long) (cnt * task->hdr->bits)/8 + (((cnt * task->hdr->bits) %8) != 0); task->blk = (MosaicBlk) (((char*) dst) + wordaligned(bytes, int)); } @@ -772,7 +772,7 @@ MOSprojection_dictionary(Client cntxt, BitVector base = (BitVector) MOScodevector(task);\ w = (TPE*) task->src;\ limit= MOSgetCnt(task->blk);\ - for( o=0, n= task->elm; n-- > 0; o++,w++ ){\ + for( o=0, n= task->stop; n-- > 0; o++,w++ ){\ for(oo = task->start,i=0; i < limit; i++,oo++){\ j= getBitVector(base,i,(int) hdr->bits); \ if ( *w == task->hdr->dict.val##TPE[j]){\ diff --git a/monetdb5/modules/mosaic/mosaic_frame.c b/monetdb5/modules/mosaic/mosaic_frame.c --- a/monetdb5/modules/mosaic/mosaic_frame.c +++ b/monetdb5/modules/mosaic/mosaic_frame.c @@ -38,7 +38,7 @@ MOSadvance_frame(Client cntxt, MOStask t assert(cnt > 0); task->start += (oid) cnt; - //task->stop = task->elm; + //task->stop = task->stop; bytes = (cnt * task->hdr->framebits)/8 + (((cnt * task->hdr->framebits) %8) != 0) + sizeof(ulng); task->blk = (MosaicBlk) (((char*) dst) + wordaligned(bytes, lng)); } @@ -604,7 +604,7 @@ MOSprojection_frame(Client cntxt, MOSta base = (BitVector) (((char*) task->blk) + MosaicBlkSize + wordaligned(sizeof(TPE),lng));\ w = (TPE*) task->src;\ limit= MOSgetCnt(task->blk);\ - for( o=0, n= task->elm; n-- > 0; o++,w++ ){\ + for( o=0, n= task->stop; n-- > 0; o++,w++ ){\ for(oo = task->start,i=0; i < limit; i++,oo++){\ framedecompress(i);\ if ( *w == frame + task->hdr->frame.val##TPE [j]){\ diff --git a/monetdb5/modules/mosaic/mosaic_hdr.c b/monetdb5/modules/mosaic/mosaic_hdr.c --- a/monetdb5/modules/mosaic/mosaic_hdr.c +++ b/monetdb5/modules/mosaic/mosaic_hdr.c @@ -114,5 +114,5 @@ MOSinitializeScan(Client cntxt, MOStask task->blk = (MosaicBlk) (((char*)task->hdr) + MosaicHdrSize + hdr->offset[startblk]); // set the oid range covered task->start = hdr->oidbase[startblk]; - task->elm = task->stop = hdr->oidbase[stopblk-1]; + task->stop = hdr->oidbase[stopblk-1]; } diff --git a/monetdb5/modules/mosaic/mosaic_linear.c b/monetdb5/modules/mosaic/mosaic_linear.c --- a/monetdb5/modules/mosaic/mosaic_linear.c +++ b/monetdb5/modules/mosaic/mosaic_linear.c @@ -720,7 +720,7 @@ MOSprojection_linear(Client cntxt, MOSt #define join_linear(TYPE)\ { TYPE *w = (TYPE*) task->src;\ TYPE step = *(TYPE*) linear_step(task,blk);\ - for(n = task->elm, o = 0; n -- > 0; w++,o++) {\ + for(n = task->stop, o = 0; n -- > 0; w++,o++) {\ TYPE val = *(TYPE*) linear_base(blk) ;\ for(oo= (oid) first; oo < (oid) last; val+=step, oo++)\ if ( *w == val){\ @@ -757,7 +757,7 @@ MOSjoin_linear(Client cntxt, MOStask ta case TYPE_int: { int *w = (int*) task->src; int step = *(int*) linear_step(task,blk); - for(n = task->elm, o = 0; n -- > 0; w++,o++){ + for(n = task->stop, o = 0; n -- > 0; w++,o++){ int val = *(int*) linear_base(blk) ; for(oo= (oid) first; oo < (oid) last; val+= step, oo++){ if ( *w == val){ diff --git a/monetdb5/modules/mosaic/mosaic_prefix.c b/monetdb5/modules/mosaic/mosaic_prefix.c --- a/monetdb5/modules/mosaic/mosaic_prefix.c +++ b/monetdb5/modules/mosaic/mosaic_prefix.c @@ -135,7 +135,7 @@ MOSadvance_prefix(Client cntxt, MOStask if( ATOMstorage(task->type == TYPE_str)) size =task->bsrc->twidth; task->start += MOSgetCnt(task->blk); - task->stop = task->elm; + task->stop = task->stop; switch(size){ case 1: { unsigned char *dst = (unsigned char*) MOScodevector(task); @@ -354,7 +354,7 @@ MOSestimate_prefix(Client cntxt, MOStask size = ATOMsize(task->type); if( ATOMstorage(task->type == TYPE_str)) size =task->bsrc->twidth; - if( task->elm >= 2) + if( task->stop >= 2) switch(size){ case 1: { unsigned char *v = ((unsigned char*) task->src) + task->start, val= *v, mask; @@ -528,7 +528,7 @@ MOScompress_prefix(Client cntxt, MOStask if( ATOMstorage(task->type == TYPE_str)) size =task->bsrc->twidth; limit = task->stop - task->start > MOSAICMAXCNT? MOSAICMAXCNT: task->stop - task->start; - if( task->elm >=2 ) + if( task->stop >=2 ) switch(size){ case 1: { unsigned char *v = ((unsigned char*) task->src) + task->start, *wlimit= v + limit, val1 = *v, mask, bits; @@ -1041,7 +1041,7 @@ break; bits = (int) (val & (~mask));\ val = val & mask;\ w = (TPE*) task->src;\ - for(n = task->elm, o = 0; n -- > 0; w++,o++){\ + for(n = task->stop, o = 0; n -- > 0; w++,o++){\ for(i=0, oo= (oid) first; oo < (oid) last; v++, oo++,i++){\ v = val | decompress(base,i,bits);\ value = (TPE) ((TPE2)val |(TPE2) v);\ diff --git a/monetdb5/modules/mosaic/mosaic_raw.c b/monetdb5/modules/mosaic/mosaic_raw.c --- a/monetdb5/modules/mosaic/mosaic_raw.c +++ b/monetdb5/modules/mosaic/mosaic_raw.c @@ -631,7 +631,7 @@ MOSprojection_raw(Client cntxt, MOStask v = (TPE*) (((char*) task->blk) + MosaicBlkSize);\ for(oo= (oid) first; first < last; first++, v++, oo++){\ w = (TPE*) task->src;\ - for(n = task->elm, o = 0; n -- > 0; w++,o++)\ + for(n = task->stop, o = 0; n -- > 0; w++,o++)\ if ( *w == *v){\ if( BUNappend(task->lbat, &oo, false)!= GDK_SUCCEED ||\ BUNappend(task->rbat, &o, false) != GDK_SUCCEED)\ @@ -666,7 +666,7 @@ MOSjoin_raw(Client cntxt, MOStask task) v = (int*) (((char*) task->blk) + MosaicBlkSize); for(oo= (oid) first; first < last; first++, v++, oo++){ w = (int*) task->src; - for(n = task->elm, o = 0; n -- > 0; w++,o++) + for(n = task->stop, o = 0; n -- > 0; w++,o++) if ( *w == *v){ if( BUNappend(task->lbat, &oo, false) != GDK_SUCCEED || BUNappend(task->rbat, &o, false) != GDK_SUCCEED ) diff --git a/monetdb5/modules/mosaic/mosaic_runlength.c b/monetdb5/modules/mosaic/mosaic_runlength.c --- a/monetdb5/modules/mosaic/mosaic_runlength.c +++ b/monetdb5/modules/mosaic/mosaic_runlength.c @@ -100,7 +100,7 @@ MOSadvance_runlength(Client cntxt, MOSta (void) cntxt; task->start += MOSgetCnt(task->blk); - //task->stop = task->elm; + //task->stop = task->stop; switch(ATOMbasetype(task->type)){ case TYPE_bte: task->blk = (MosaicBlk)( ((char*)task->blk) + wordaligned( MosaicBlkSize + sizeof(bte),bte)); break; case TYPE_bit: task->blk = (MosaicBlk)( ((char*)task->blk) + wordaligned( MosaicBlkSize + sizeof(bit),bit)); break; @@ -677,7 +677,7 @@ MOSprojection_runlength(Client cntxt, M { TPE *v, *w;\ v = (TPE*) (((char*) task->blk) + MosaicBlkSize);\ w = (TPE*) task->src;\ - for(n = task->elm, o = 0; n -- > 0; w++,o++)\ + for(n = task->stop, o = 0; n -- > 0; w++,o++)\ if ( *w == *v)\ for(oo= (oid) first; oo < (oid) last; v++, oo++){\ if(BUNappend(task->lbat, &oo, false) != GDK_SUCCEED ||\ @@ -712,7 +712,7 @@ MOSjoin_runlength(Client cntxt, MOStask { int *v, *w; v = (int*) (((char*) task->blk) + MosaicBlkSize); w = (int*) task->src; - for(n = task->elm, o = 0; n -- > 0; w++,o++) + for(n = task->stop, o = 0; n -- > 0; w++,o++) if ( *w == *v) for(oo= (oid) first; oo < (oid) last; v++, oo++){ if( BUNappend(task->lbat, &oo, false) != GDK_SUCCEED || _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list