Ignore:
Timestamp:
Oct 13, 2016, 11:05:03 AM (3 years ago)
Author:
cameron
Message:

mmap and posix_memalign buffering options for u8u16

File:
1 edited

Legend:

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

    r5190 r5191  
    1111#include <IDISA/idisa_builder.h>
    1212#include <llvm/IR/Type.h>
    13    
     13
    1414namespace parabix {
    1515   
     
    4141class StreamSetBuffer {
    4242public:
    43     enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, LinearBuffer, ExpandingBuffer};
     43    enum class BufferKind : unsigned {BlockBuffer, ExternalFileBuffer, CircularBuffer, LinearCopybackBuffer};
    4444    inline BufferKind getBufferKind() const {return mBufferKind;}
    4545    inline StreamSetType& getBufferStreamSetType() {return mStreamSetType;}
     
    120120
    121121};
    122 
     122   
    123123class CircularBuffer : public StreamSetBuffer {
    124124public:
     
    137137// offset of the block containing the current consumer position is always zero.
    138138//
    139 class LinearBuffer : public StreamSetBuffer {
     139class LinearCopybackBuffer : public StreamSetBuffer {
    140140public:
    141     static inline bool classof(const StreamSetBuffer * b) {return b->getBufferKind() == BufferKind::LinearBuffer;}
     141    static inline bool classof(const StreamSetBuffer * b) {return b->getBufferKind() == BufferKind::LinearCopybackBuffer;}
    142142   
    143     LinearBuffer(IDISA::IDISA_Builder * b, StreamSetType ss_type, size_t bufferBlocks, unsigned AddressSpace = 0) :
    144         StreamSetBuffer(BufferKind::CircularBuffer, b, ss_type, bufferBlocks, AddressSpace) {}
     143    LinearCopybackBuffer(IDISA::IDISA_Builder * b, StreamSetType ss_type, size_t bufferBlocks, unsigned AddressSpace = 0) :
     144        StreamSetBuffer(BufferKind::LinearCopybackBuffer, b, ss_type, bufferBlocks, AddressSpace) {}
    145145   
    146146    llvm::Value * getStreamSetBlockPointer(llvm::Value * bufferStructPtr, llvm::Value * blockNo) override;
Note: See TracChangeset for help on using the changeset viewer.