Ignore:
Timestamp:
Jul 7, 2017, 8:58:29 AM (23 months ago)
Author:
cameron
Message:

Processing rate analysis and validation

File:
1 edited

Legend:

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

    r5497 r5552  
    122122    }
    123123   
     124    // Kernels typically perform block-at-a-time processing, but some kernels may require
     125    // a different stride.   In the case of multiblock kernels, the stride attribute
     126    // determines the number of minimum number of items that will be provided to the kernel
     127    // on each doMultiBlock call.
     128    //
     129   
     130    unsigned getKernelStride() const { return mStride;}
     131   
     132    void setKernelStride(unsigned stride) {mStride = stride;}
     133   
    124134    virtual ~Kernel() = 0;
    125135
     
    138148    // in terms of 3 virtual methods for
    139149    // (a) preparing the Kernel state data structure
    140     // (b) defining the logic of the doBlock function, and
    141150    // (c) defining the logic of the finalBlock function.
    142151    //
     
    152161
    153162    void prepareStreamSetNameMap();
     163   
     164    void processingRateAnalysis();
    154165
    155166    void linkExternalMethods(const std::unique_ptr<kernel::KernelBuilder> &) override { }
     
    232243    StreamSetBuffers                    mStreamSetInputBuffers;
    233244    StreamSetBuffers                    mStreamSetOutputBuffers;
     245    unsigned                            mStride;
     246    std::vector<unsigned>               mItemsPerStride;
     247    std::vector<unsigned>               mIsDerived;
    234248
    235249};
     
    394408    virtual void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & idb) = 0;
    395409   
    396     // Kernels typically perform block-at-a-time processing, but some kernels may require
    397     // a different stride.   In the case of multiblock kernels, the stride attribute
    398     // determines the number of minimum number of items that will be provided to the kernel
    399     // on each doMultiBlock call.
    400     //
    401    
    402     unsigned getKernelStride() const { return mStride;}
    403        
    404     void setKernelStride(unsigned stride) {mStride = stride;}
    405        
    406        
    407 
    408410private:
    409     size_t                            mStride;
    410 
    411 
    412411    // Given a kernel subtype with an appropriate interface, the generateDoSegment
    413412    // method of the multi-block kernel builder makes all the necessary arrangements
Note: See TracChangeset for help on using the changeset viewer.