Ignore:
Timestamp:
Mar 25, 2016, 5:42:03 PM (3 years ago)
Author:
nmedfort
Message:

Symbol table work and untested kernel instatiate method for multiple input streams

File:
1 edited

Legend:

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

    r4986 r4991  
    5959
    6060    inline llvm::Value * getInputStream(const unsigned index, const unsigned streamOffset = 0) {
    61         return getInputStream(mKernelParam, index, streamOffset);
     61        return getInputStream(mKernelState, index, streamOffset);
    6262    }
    6363
    6464    inline llvm::Value * getInputScalar(const unsigned index) {
    65         return getInputScalar(mKernelParam, index);
     65        return getInputScalar(mKernelState, index);
    6666    }
    6767
    6868    llvm::Value * getInternalState(const std::string & name) {
    69         return getInternalState(mKernelParam, name);
     69        return getInternalState(mKernelState, name);
    7070    }
    7171
    7272    void setInternalState(const std::string & name, llvm::Value * value) {
    73         setInternalState(mKernelParam, name, value);
     73        setInternalState(mKernelState, name, value);
    7474    }
    7575
    7676    llvm::Value * getInternalState(const unsigned index) {
    77         return getInternalState(mKernelParam, index);
     77        return getInternalState(mKernelState, index);
    7878    }
    7979
    8080    void setInternalState(const unsigned index, llvm::Value * value) {
    81         setInternalState(mKernelParam, index, value);
     81        setInternalState(mKernelState, index, value);
    8282    }
    8383
    8484    llvm::Value * getOutputStream(const unsigned index, const unsigned streamOffset = 0) {
    85         return getOutputStream(mKernelParam, index, streamOffset);
     85        return getOutputStream(mKernelState, index, streamOffset);
    8686    }
    8787
     
    9191
    9292    llvm::Value * getOutputScalar(const unsigned index) {
    93         return getOutputScalar(mKernelParam, index);
     93        return getOutputScalar(mKernelState, index);
    9494    }
    9595
     
    9999
    100100    llvm::Value * getBlockNo() {
    101         return getBlockNo(mKernelParam);
     101        return getBlockNo(mKernelState);
    102102    }
    103103
     
    114114    kernel::Instance * instantiate(llvm::Value * const inputStream);
    115115
    116     kernel::Instance * instantiate(std::pair<llvm::Value *, unsigned> &&inputStream);
     116    kernel::Instance * instantiate(std::initializer_list<llvm::Value *> inputStreams);
     117
     118    kernel::Instance * instantiate(std::pair<llvm::Value *, unsigned> && inputStream);
    117119
    118120    llvm::Type * getKernelStateType() const;
     
    122124    llvm::Function * getDoBlockFunction() const;
    123125
    124     void clearOutputStream(llvm::Value * const instance, const unsigned streamOffset = 0);
    125 
    126     void setLongestLookaheadAmount(const unsigned bits);
     126    void clearOutputStreamSet(llvm::Value * const instance, const unsigned streamOffset = 0);
    127127
    128128protected:
     
    153153
    154154    llvm::Function * CreateModFunction(const unsigned size);
     155
     156    void eliminateRedundantMemoryOperations(llvm::Function * const function);
    155157
    156158private:
     
    169171    llvm::Type *                        mOutputStreamType;
    170172
    171     llvm::Value *                       mInputParam;
    172     llvm::Value *                       mKernelParam;
     173    llvm::Value *                       mKernelState;
    173174    unsigned                            mBlockNoIndex;
    174175
     
    192193
    193194inline llvm::Value * KernelBuilder::getKernelState() const {
    194     return mKernelParam;
     195    return mKernelState;
    195196}
    196197
Note: See TracChangeset for help on using the changeset viewer.