Ignore:
Timestamp:
Aug 4, 2017, 12:31:21 PM (22 months ago)
Author:
nmedfort
Message:

Modified stream set buffers to use heap memory.

File:
1 edited

Legend:

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

    r5544 r5597  
    162162    llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock) const override;
    163163
    164     virtual llvm::Type * getStreamSetBlockType() const override;
     164    llvm::Type * getStreamSetBlockType() const override;
     165
     166    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & kb) override;
     167
     168    void releaseBuffer(const std::unique_ptr<kernel::KernelBuilder> & kb) const override;
    165169
    166170protected:
     
    182186    ExternalBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, llvm::Type * type, llvm::Value * addr, unsigned AddressSpace = 0);
    183187
    184     // Can't allocate - raise an error. */
     188    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition) const override;
     189
    185190    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    186191
    187     llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition) const override;
     192    void releaseBuffer(const std::unique_ptr<kernel::KernelBuilder> & kb) const override;
    188193
    189194protected:
     
    221226   
    222227    CircularCopybackBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, llvm::Type * type, size_t bufferBlocks, size_t overflowBlocks, unsigned AddressSpace = 0);
    223 
    224     void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    225228   
    226229    // Generate copyback code for the given number of overflowItems.
     
    230233   
    231234    llvm::Value * getLinearlyWritableBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock) const override;
    232    
     235
     236    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
     237
    233238private:
    234239    size_t mOverflowBlocks;
     
    241246   
    242247    SwizzledCopybackBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, llvm::Type * type, size_t bufferBlocks, size_t overflowBlocks, unsigned fieldwidth = 64, unsigned AddressSpace = 0);
    243    
    244     void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    245    
     248       
    246249    void createBlockAlignedCopy(IDISA::IDISA_Builder * const iBuilder, llvm::Value * targetBlockPtr, llvm::Value * sourceBlockPtr, llvm::Value * itemsToCopy) const override;
    247250
     
    253256    llvm::Value * getLinearlyWritableBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock) const override;
    254257   
     258    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
     259
    255260protected:
    256261    llvm::Value * getStreamSetBlockPtr(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * blockIndex) const override;
     
    276281    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition) const override;
    277282
     283    llvm::Value * getStreamSetCount(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self) const override;
     284
    278285    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    279 
    280     llvm::Value * getStreamSetCount(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self) const override;
    281286
    282287    void releaseBuffer(const std::unique_ptr<kernel::KernelBuilder> & kb) const override;
Note: See TracChangeset for help on using the changeset viewer.