Beispiel #1
0
 /// <summary>
 /// Calculates the histogram on the given view.
 /// </summary>
 /// <typeparam name="T">The input view element type.</typeparam>
 /// <typeparam name="TIndex">The input view index type.</typeparam>
 /// <typeparam name="TBinType">The histogram bin type.</typeparam>
 /// <typeparam name="TIncrementor">
 /// The operation to increment the value of the bin.
 /// </typeparam>
 /// <typeparam name="TLocator">
 /// The operation to compute the bin location.
 /// </typeparam>
 /// <param name="accelerator">The accelerator.</param>
 /// <param name="stream">The accelerator stream.</param>
 /// <param name="view">The input view.</param>
 /// <param name="histogram">The histogram view to update.</param>
 /// <param name="histogramOverflow">
 /// Single-element view that indicates whether the histogram has overflowed.
 /// </param>
 public static void Histogram <T, TIndex, TBinType, TIncrementor, TLocator>(
     this Accelerator accelerator,
     AcceleratorStream stream,
     ArrayView <T, TIndex> view,
     ArrayView <TBinType> histogram,
     ArrayView <int> histogramOverflow)
     where T : unmanaged
     where TIndex : unmanaged, IIndex, IGenericIndex <TIndex>
     where TBinType : unmanaged
     where TIncrementor : struct, IIncrementOperation <TBinType>
     where TLocator : struct, IComputeMultiBinOperation <T, TBinType, TIncrementor>
 {
     accelerator.CreateHistogram <T, TIndex, TBinType, TIncrementor, TLocator>()(
         stream,
         view,
         histogram,
         histogramOverflow);
 }