Dec 15, 2017, 12:44:01 PM (18 months ago)

Initial check-in of LookAhead? support; modified LineBreakKernel? to compute CR+LF using LookAhead?(1) + misc. fixes.

1 edited


  • icGREP/icgrep-devel/icgrep/kernels/processing_rate.h

    r5756 r5782  
    88namespace kernel {
    10 // Processing rate attributes are required for all stream set bindings for a kernel.
    11 // These attributes describe the number of items that are processed or produced as
    12 // a ratio in comparison to a reference stream set, normally the principal input stream set
    13 // by default (or the principal output stream set if there is no input).
     10// Processing rate attributes are required for all stream set bindings. They describe
     11// the relationship between processed items (inputs) and produced items (outputs).
    15 // The default ratio is FixedRatio(1) which means that there is one item processed or
    16 // produced for every item of the reference stream.
    17 // FixedRatio(m, n) means that for every group of n items of the refrence stream,
    18 // there are m items in the output stream (rounding up).
     13// For example, the 3-to-4 kernel converts every 3 input items into 4 output items.
     14// Thus it has a FixedRate(3) for its input stream and FixedRate(4) for its output
     15// stream. Processing these every 3 items individually would be time consuming. Instead
     16// the kernel processes a strides' worth of "iterations" and automatically scales the
     17// FixedRates accordingly.
    20 // Kernels which produce a variable number of items use MaxRatio(n), for a maximum
    21 // of n items produced or consumed per principal input or output item.  MaxRatio(m, n)
    22 // means there are at most m items for every n items of the reference stream.
    23 //
    24 // RoundUpToMultiple(n) means that number of items produced is the same as the
    25 // number of reference items, rounded up to an exact multiple of n.
    26 //
     19// NOTE: fixed and bounded rates should be the smallest number of input items for the
     20// smallest number of output items that can be logically produced by a kernel.
    2825struct ProcessingRate  {
    145142ProcessingRate::RateValue gcd(const ProcessingRate::RateValue & x, const ProcessingRate::RateValue & y);
     144unsigned ceiling(const ProcessingRate::RateValue & r);
Note: See TracChangeset for help on using the changeset viewer.