Ignore:
Timestamp:
Dec 15, 2016, 12:56:58 PM (3 years ago)
Author:
cameron
Message:

Move responsibility for acquire/release of logical segment number into pipeline compilers.

File:
1 edited

Legend:

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

    r5220 r5224  
    5151
    5252    Value * getBlockNo(Value * self);
    53     virtual llvm::Value * getLogicalSegmentNo(llvm::Value * kernelInstance) override;
    5453    virtual llvm::Value * getProcessedItemCount(llvm::Value * kernelInstance) override;
    5554    virtual llvm::Value * getProducedItemCount(llvm::Value * kernelInstance) override;
     
    6362        return getBuilder()->getStreamSetTy(NumElements, FieldWidth);
    6463    }
     64   
     65    // Synchronization actions for executing a kernel for a particular logical segment.
     66    //
     67    // Before the segment is processed, acquireLogicalSegmentNo must be used to load
     68    // the segment number of the kernel state to ensure that the previous segment is
     69    // complete (by checking that the acquired segment number is equal to the desired segment
     70    // number).
     71    // After all segment processing actions for the kernel are complete, and any necessary
     72    // data has been extracted from the kernel for further pipeline processing, the
     73    // segment number must be incremented and stored using releaseLogicalSegmentNo.
     74    llvm::Value * acquireLogicalSegmentNo(llvm::Value * kernelInstance);
     75    void releaseLogicalSegmentNo(llvm::Value * kernelInstance, Value * newFieldVal);
     76
    6577
    6678protected:
     
    124136   
    125137    void setBlockNo(Value * self, Value * newFieldVal);
    126     virtual void setLogicalSegmentNo(llvm::Value * self, Value * newFieldVal);
    127138    virtual void setProcessedItemCount(llvm::Value * self, Value * newFieldVal);
    128139    virtual void setProducedItemCount(llvm::Value * self, Value * newFieldVal);
Note: See TracChangeset for help on using the changeset viewer.