Ignore:
Timestamp:
Mar 2, 2017, 12:18:43 PM (2 years ago)
Author:
cameron
Message:

Swizzled bitstream deletion and -enable-AVX-deletion in u8u16

File:
1 edited

Legend:

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

    r5353 r5355  
    1919public:
    2020
    21     enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, CircularCopybackBuffer, ExpandableBuffer};
     21    enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, CircularCopybackBuffer, SwizzledCopybackBuffer, ExpandableBuffer};
    2222
    2323    BufferKind getBufferKind() const {
     
    5757    // The number of items that cam be linearly accessed from a given logical stream position.
    5858    virtual llvm::Value * getLinearlyAccessibleItems(llvm::Value * fromPosition) const;
    59    
     59    virtual llvm::Value * getLinearlyAccessibleBlocks(llvm::Value * fromBlock) const;
    6060protected:
    6161
     
    143143    void createCopyBack(llvm::Value * self, llvm::Value * overflowItems) const;
    144144   
    145    
     145
     146       
     147       
    146148protected:
    147149    llvm::Value * getStreamSetBlockPtr(llvm::Value * self, llvm::Value * blockIndex) const override;
     
    149151    size_t mOverflowBlocks;
    150152
     153};
     154   
     155class SwizzledCopybackBuffer : public StreamSetBuffer {
     156public:
     157    static inline bool classof(const StreamSetBuffer * b) {return b->getBufferKind() == BufferKind::SwizzledCopybackBuffer;}
     158   
     159    SwizzledCopybackBuffer(IDISA::IDISA_Builder * b, llvm::Type * type, size_t bufferBlocks, size_t overflowBlocks, unsigned fieldwidth = 64, unsigned AddressSpace = 0);
     160   
     161    void allocateBuffer() override;
     162   
     163    // Generate copyback code for the given number of overflowItems.
     164    void createCopyBack(llvm::Value * self, llvm::Value * overflowItems) const;
     165protected:
     166    llvm::Value * getStreamSetBlockPtr(llvm::Value * self, llvm::Value * blockIndex) const override;
     167private:
     168    size_t mOverflowBlocks;
     169    unsigned mFieldWidth;
     170   
    151171};
    152172
Note: See TracChangeset for help on using the changeset viewer.