Ignore:
Timestamp:
May 3, 2017, 1:13:04 PM (2 years ago)
Author:
nmedfort
Message:

partial refactoring check in with change for Linda.

File:
1 edited

Legend:

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

    r5425 r5431  
    8282    void setName(std::string newName) { mKernelName = newName; }
    8383       
     84    virtual bool isCachable() const = 0;
     85
     86    virtual std::string makeSignature() = 0;
     87
    8488    const std::vector<Binding> & getStreamInputs() const { return mStreamSetInputs; }
    8589
     
    9195       
    9296    // Add ExternalLinkage method declarations for the kernel to a given client module.
    93     void addKernelDeclarations(llvm::Module * client);
     97    void addKernelDeclarations();
     98
     99    virtual void linkExternalMethods() = 0;
    94100
    95101    virtual llvm::Value * createInstance() = 0;
     
    109115    }
    110116   
    111     IDISA::IDISA_Builder * getBuilder() const {
    112         return iBuilder;
    113     }
    114 
    115117    virtual llvm::Value * getProducedItemCount(const std::string & name, llvm::Value * doFinal = nullptr) const = 0;
    116118
     
    133135    }
    134136
    135     llvm::Function * getInitFunction() const;
     137    IDISA::IDISA_Builder * getBuilder() const {
     138        return iBuilder;
     139    }
    136140
    137     llvm::Function * getDoSegmentFunction() const;
    138 
    139     llvm::Function * getTerminateFunction() const;
     141    void setBuilder(IDISA::IDISA_Builder * const builder) {
     142        iBuilder = builder;
     143    }
    140144
    141145protected:
    142146
    143     virtual void linkExternalMethods() = 0;
     147    llvm::Function * getInitFunction(llvm::Module * const module) const;
    144148
    145     KernelInterface(IDISA::IDISA_Builder * builder,
     149    llvm::Function * getDoSegmentFunction(llvm::Module * const module) const;
     150
     151    llvm::Function * getTerminateFunction(llvm::Module * const module) const;
     152
     153    KernelInterface(IDISA::IDISA_Builder * const builder,
    146154                    std::string kernelName,
    147155                    std::vector<Binding> && stream_inputs,
     
    172180protected:
    173181   
    174     IDISA::IDISA_Builder * const    iBuilder;
     182    IDISA::IDISA_Builder *          iBuilder;
    175183    llvm::Value *                   mKernelInstance;
    176184    llvm::StructType *              mKernelStateType;
Note: See TracChangeset for help on using the changeset viewer.