Ignore:
Timestamp:
Jul 22, 2015, 8:39:29 AM (4 years ago)
Author:
cameron
Message:

Carry Manager restructuring and bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/carry_data.h

    r4682 r4687  
    99#include <include/simd-lib/bitblock.hpp>
    1010#include <stdexcept>
     11#include <iostream>
     12#include <ostream>
     13#include <llvm/Support/raw_os_ostream.h>
    1114/*
    1215 * Carry Data system.
     
    4851class PabloBlockCarryData {
    4952public:
    50     PabloBlockCarryData(): framePosition(0),
     53    PabloBlockCarryData(PabloBlock * b):
     54                           theScope(b), framePosition(0),
    5155                           ifDepth(0), whileDepth (0), maxNestingDepth(0),
    5256                           longAdvance({0, 0, 0}),
     
    5761                           summary({0, 0}),
    5862                           scopeCarryDataBits(0)
    59                            {}
     63    {enumerateLocal();}
    6064       
    61     unsigned enumerate(PabloBlock & p);
     65    friend class CarryManager;
     66   
     67    void enumerateLocal();
     68    void dumpCarryData(llvm::raw_ostream & strm);
    6269   
    6370    unsigned getBlockCarryDataIndex()  const {
    6471        return framePosition/BLOCK_SIZE;
     72    }
     73   
     74    void setFramePosition(unsigned p) {
     75        framePosition = p;
    6576    }
    6677   
     
    6980    }
    7081   
     82    void setIfDepth(unsigned d) {
     83        ifDepth = d;
     84    }
     85   
    7186    unsigned getWhileDepth()  const {
    7287        return whileDepth;
    7388    }
    7489       
     90    void setWhileDepth(unsigned d) {
     91        whileDepth = d;
     92    }
     93   
    7594    unsigned longAdvanceCarryDataOffset(unsigned advanceIndex)  const {
    7695        return fullOrPartialBlocks(longAdvance.frameOffsetinBits, BLOCK_SIZE) + advanceIndex;
     
    113132    bool explicitSummaryRequired() const { return (ifDepth > 0) && (scopeCarryDataBits > PACK_SIZE);}
    114133   
    115 private:
     134protected:
     135   
     136    PabloBlock * theScope;
    116137   
    117138    unsigned framePosition;
Note: See TracChangeset for help on using the changeset viewer.