Changeset 5782 for icGREP/icgrepdevel/icgrep/kernels/processing_rate.h
 Timestamp:
 Dec 15, 2017, 12:44:01 PM (18 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

icGREP/icgrepdevel/icgrep/kernels/processing_rate.h
r5756 r5782 8 8 namespace kernel { 9 9 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). 14 12 // 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 3to4 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. 19 18 // 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. 21 22 23 27 24 28 25 struct ProcessingRate { … … 145 142 ProcessingRate::RateValue gcd(const ProcessingRate::RateValue & x, const ProcessingRate::RateValue & y); 146 143 144 unsigned ceiling(const ProcessingRate::RateValue & r); 145 147 146 } 148 147
Note: See TracChangeset
for help on using the changeset viewer.