Ignore:
Timestamp:
Jan 20, 2012, 9:06:09 AM (7 years ago)
Author:
cameron
Message:

Reverse scan needs scan_backward_zeroes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock_scan.hpp

    r1858 r1861  
    8989                while (this->blk > 0){
    9090                        if(this->scan_blk > 0){
    91                                 this->pos = (sizeof(scanblock_t)*8 - scan_forward_zeroes(this->scan_blk) -1) + ( (this->blk-1) * sizeof(scanblock_t)*8 );
     91                                this->pos = (sizeof(scanblock_t)*8 - scan_backward_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.