Ignore:
Timestamp:
Jan 19, 2017, 2:41:02 PM (2 years ago)
Author:
nmedfort
Message:

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File:
1 edited

Legend:

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

    r5263 r5267  
    4040     */
    4141   
    42     std::string getName() const { return mKernelName;}
     42    const std::string & getName() const { return mKernelName;}
    4343       
    44     std::vector<Binding> getStreamInputs() {return mStreamSetInputs;}
    45     std::vector<Binding> getStreamOutputs() {return mStreamSetOutputs;}
    46     std::vector<Binding> getScalarInputs() { return mScalarInputs;}
    47     std::vector<Binding> getScalarOutputs() { return mScalarOutputs;}
     44    const std::vector<Binding> & getStreamInputs() const {return mStreamSetInputs;}
     45    const std::vector<Binding> & getStreamOutputs() const {return mStreamSetOutputs;}
     46    const std::vector<Binding> & getScalarInputs() const { return mScalarInputs;}
     47    const std::vector<Binding> & getScalarOutputs() const { return mScalarOutputs;}
    4848   
    4949   
    5050    // Add ExternalLinkage method declarations for the kernel to a given client module.
    51     void addKernelDeclarations(llvm::Module * client);
     51    void addKernelDeclarations(llvm::Module * client) const;
    5252    virtual void createInstance() = 0;
    5353    void setInitialArguments(std::vector<llvm::Value *> args);
     
    7979
    8080    KernelInterface(IDISA::IDISA_Builder * builder,
    81                     std::string kernelName,
     81                    std::string && kernelName,
    8282                    std::vector<Binding> stream_inputs,
    8383                    std::vector<Binding> stream_outputs,
    8484                    std::vector<Binding> scalar_inputs,
    8585                    std::vector<Binding> scalar_outputs,
    86                     std::vector<Binding> internal_scalars) :
    87     iBuilder(builder),
    88     mKernelName(kernelName),
    89     mStreamSetInputs(stream_inputs),
    90     mStreamSetOutputs(stream_outputs),
    91     mScalarInputs(scalar_inputs),
    92     mScalarOutputs(scalar_outputs),
    93     mInternalScalars(internal_scalars),
    94     mKernelStateType(nullptr),
    95     mKernelInstance(nullptr),
    96     mLookAheadPositions(0) {}
     86                    std::vector<Binding> internal_scalars)
     87    : iBuilder(builder)
     88    , mKernelName(kernelName)
     89    , mStreamSetInputs(stream_inputs)
     90    , mStreamSetOutputs(stream_outputs)
     91    , mScalarInputs(scalar_inputs)
     92    , mScalarOutputs(scalar_outputs)
     93    , mInternalScalars(internal_scalars)
     94    , mKernelStateType(nullptr)
     95    , mKernelInstance(nullptr)
     96    , mLookAheadPositions(0) {
     97
     98    }
    9799   
    98100protected:
    99101   
    100102    IDISA::IDISA_Builder * const iBuilder;
    101     std::string mKernelName;
     103    const std::string mKernelName;
    102104    std::vector<llvm::Value *> mInitialArguments;
    103105    std::vector<Binding> mStreamSetInputs;
Note: See TracChangeset for help on using the changeset viewer.