Ignore:
Timestamp:
Sep 5, 2016, 9:13:11 AM (3 years ago)
Author:
cameron
Message:

ExternalFileBuffer?, SingleBlockBuffer? fixes

File:
1 edited

Legend:

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

    r5139 r5142  
    3232class StreamSetBuffer {
    3333public:
    34     enum class BufferKind : unsigned {BlockBuffer, ExternalUnboundedBuffer, CircularBuffer, ExpandingBuffer};
     34    enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, ExpandingBuffer};
    3535    inline BufferKind getBufferKind() const {return mBufferKind;}
    3636    inline StreamSetType& getBufferStreamSetType() {return mStreamSetType;}
     
    8989                                                                    iBuilder->getSizeTy(),
    9090                                                                    iBuilder->getInt8Ty(),
    91                                                                     mStreamSetType.getStreamSetBlockType(iBuilder)}));
     91                                                                    getStreamBufferPointerType()}));
    9292
    9393    }
     
    9898};
    9999   
    100 class ExternalUnboundedBuffer : public StreamSetBuffer {
     100class ExternalFileBuffer : public StreamSetBuffer {
    101101public:
    102     static inline bool classof(const StreamSetBuffer * b) {return b->getBufferKind() == BufferKind::ExternalUnboundedBuffer;}
     102    static inline bool classof(const StreamSetBuffer * b) {return b->getBufferKind() == BufferKind::ExternalFileBuffer;}
    103103   
    104     ExternalUnboundedBuffer(IDISA::IDISA_Builder * b, StreamSetType ss_type, unsigned AddressSpace = 0) :
    105         StreamSetBuffer(BufferKind::ExternalUnboundedBuffer, b, ss_type) {
     104    ExternalFileBuffer(IDISA::IDISA_Builder * b, StreamSetType ss_type, unsigned AddressSpace = 0) :
     105        StreamSetBuffer(BufferKind::ExternalFileBuffer, b, ss_type) {
    106106            mBufferBlocks = 0;
    107107            mAddrSpace = AddressSpace;
     
    114114    llvm::PointerType * getStreamBufferPointerType() override;
    115115
    116     void setStreamSetBuffer(llvm::Value * ptr);
     116    void setStreamSetBuffer(llvm::Value * ptr, llvm::Value * fileSize);
    117117   
    118118    size_t getBufferSize() override;
Note: See TracChangeset for help on using the changeset viewer.