Ignore:
Timestamp:
Sep 21, 2017, 3:10:34 PM (20 months ago)
Author:
nmedfort
Message:

Minor clean up. Bug fix for object cache when the same cached kernel is used twice in a single run. Improvement to RE Minimizer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/interface.h

    r5620 r5646  
    106106    }
    107107
     108    unsigned getNumOfStreamInputs() const {
     109        return mStreamSetInputs.size();
     110    }
     111
    108112    const std::vector<Binding> & getStreamOutputs() const {
    109113        return mStreamSetOutputs;
     114    }
     115
     116    unsigned getNumOfStreamOutputs() const {
     117        return mStreamSetOutputs.size();
    110118    }
    111119
     
    155163    }
    156164
    157     unsigned getLookAhead() const {
    158         return mLookAheadPositions;
    159     }
    160 
    161     void setLookAhead(const unsigned lookAheadPositions) {
    162         mLookAheadPositions = lookAheadPositions;
     165    unsigned getLookAhead(const unsigned i) const {
     166        assert (i < mStreamSetInputLookahead.size());
     167        return mStreamSetInputLookahead[i];
     168    }
     169
     170    void setLookAhead(const unsigned i, const unsigned lookAheadPositions) {
     171        assert (i < mStreamSetInputLookahead.size());
     172        mStreamSetInputLookahead[i] = lookAheadPositions;
    163173    }
    164174
     
    180190    , mModule(nullptr)
    181191    , mKernelStateType(nullptr)
    182     , mLookAheadPositions(0)
    183192    , mKernelName(kernelName)
    184193    , mStreamSetInputs(stream_inputs)
     194    , mStreamSetInputLookahead(mStreamSetInputs.size(), 0)
    185195    , mStreamSetOutputs(stream_outputs)
    186196    , mScalarInputs(scalar_inputs)
     
    195205    llvm::Module *                          mModule;
    196206    llvm::StructType *                      mKernelStateType;
    197     unsigned                                mLookAheadPositions;
    198207    const std::string                       mKernelName;
    199208    std::vector<llvm::Value *>              mInitialArguments;
    200209    std::vector<Binding>                    mStreamSetInputs;
     210    std::vector<unsigned>                   mStreamSetInputLookahead;
    201211    std::vector<Binding>                    mStreamSetOutputs;
    202212    std::vector<Binding>                    mScalarInputs;
Note: See TracChangeset for help on using the changeset viewer.