Ignore:
Timestamp:
Feb 3, 2017, 1:25:53 PM (2 years ago)
Author:
nmedfort
Message:

Partial removal of BlockNo?

File:
1 edited

Legend:

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

    r5276 r5297  
    2222    enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, LinearCopybackBuffer, ExpandableBuffer};
    2323
    24     inline BufferKind getBufferKind() const {
     24    BufferKind getBufferKind() const {
    2525        return mBufferKind;
    2626    }
    2727
    28     inline llvm::Type * getBufferStreamSetType() const {
     28    llvm::Type * getType() const {
    2929        return mStreamSetType;
    3030    }
    3131
    32     llvm::PointerType * getStreamBufferPointerType() const {
    33         return mStreamSetType->getPointerTo(mAddrSpace);
     32    llvm::Type * getBaseType() const {
     33        return mBaseStreamSetType;
    3434    }
    3535
    36     size_t getBufferSize() const { return mBufferBlocks; }
     36    llvm::PointerType * getPointerType() const {
     37        return getType()->getPointerTo(mAddressSpace);
     38    }
    3739
    38     llvm::Value * getStreamSetBasePtr() const { return mStreamSetBufferPtr; }
     40    size_t getBufferSize() const {
     41        return mBufferSize;
     42    }
     43
     44    llvm::Value * getStreamSetBasePtr() const {
     45        return mStreamSetBufferPtr;
     46    }
    3947
    4048    virtual void allocateBuffer();
     
    4452    virtual llvm::Value * getStream(llvm::Value * self, llvm::Value * blockNo, llvm::Value * index1, llvm::Value * index2) const;
    4553   
    46     virtual llvm::Value * getStreamView(llvm::Value * self, llvm::Value * blockNo, llvm::Value * index) const;
    47 
    4854    virtual llvm::Value * getStreamView(llvm::Type * type, llvm::Value * self, llvm::Value * blockNo, llvm::Value * index) const;
    4955
    50     llvm::Type * resolveStreamTypes(llvm::Type * type);
    51    
    5256protected:
    5357
     
    5761    virtual llvm::Value * getStreamSetPtr(llvm::Value * self, llvm::Value * blockNo) const = 0;
    5862
     63    llvm::Type * resolveStreamSetBufferType(llvm::Type * type) const;
     64
    5965protected:
    6066    const BufferKind                mBufferKind;
    6167    IDISA::IDISA_Builder * const    iBuilder;
    6268    llvm::Type * const              mStreamSetType;
    63     const size_t                    mBufferBlocks;
    64     const int                       mAddrSpace;
     69    const size_t                    mBufferSize;
     70    const unsigned                  mAddressSpace;
    6571    llvm::Value *                   mStreamSetBufferPtr;
     72    llvm::Type * const              mBaseStreamSetType;
    6673};   
    6774
     
    139146    llvm::Value * getStream(llvm::Value * self, llvm::Value * blockNo, llvm::Value * index1, llvm::Value * index2) const override;
    140147
    141     llvm::Value * getStreamView(llvm::Value * self, llvm::Value * blockNo, llvm::Value * index) const override;
    142 
    143148    llvm::Value * getStreamView(llvm::Type * type, llvm::Value * self, llvm::Value * blockNo, llvm::Value * index) const override;
    144149
Note: See TracChangeset for help on using the changeset viewer.