Changeset 1858 for trunk/lib


Ignore:
Timestamp:
Jan 19, 2012, 8:24:01 PM (7 years ago)
Author:
ksherdy
Message:

Updated scan forward call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock_scan.hpp

    r1680 r1858  
    5151                while (this->blk < (sizeof(bitblock_t)/sizeof(scanblock_t))){
    5252                        if(this->scan_blk > 0){
    53                                 this->pos = count_forward_zeroes(this->scan_blk) + (this->blk * (sizeof(scanblock_t)*8));
     53                                this->pos = scan_forward_zeroes(this->scan_blk) + (this->blk * (sizeof(scanblock_t)*8));
    5454                                this->scan_blk = this->scan_blk & (this->scan_blk-1);  // clear rightmost bit
    5555
     
    8989                while (this->blk > 0){
    9090                        if(this->scan_blk > 0){
    91                                 this->pos = (sizeof(scanblock_t)*8 - count_reverse_zeroes(this->scan_blk) -1) + ( (this->blk-1) * sizeof(scanblock_t)*8 );
     91                                this->pos = (sizeof(scanblock_t)*8 - scan_forward_zeroes(this->scan_blk) -1) + ( (this->blk-1) * sizeof(scanblock_t)*8 );
    9292                                this->scan_blk = this->scan_blk ^ (1 << this->pos); // clear leftmost bit
    9393                                return (this->pos);
Note: See TracChangeset for help on using the changeset viewer.