Adelsbach/VSIPL
Core Light Double Precision Programming Reference Guide
DD-00014-015
Core Light +DP

13.1 vsip_vhisto_p - Compute Histogram of a Vector View

typedef enum _vsip_hist_opt { 
  VSIP_HIST_RESET = 1, 
  VSIP_HIST_ACCUM = 2 
} vsip_hist_opt; 
 
void vsip_vhisto_f(const vsip_vview_f *src, vsip_scalar_f min_bin, 
                    vsip_scalar_f max_bin, vsip_hist_opt opt, 
                    const vsip_vview_f *hist); 
void vsip_vhisto_d(const vsip_vview_d *src, vsip_scalar_d min_bin, 
                    vsip_scalar_d max_bin, vsip_hist_opt opt, 
                    const vsip_vview_d *hist);
Description

This function computes the histogram of the elements in the vector view src and stores the result in the vector view hist. The histogram is computed over the range [min_bin, max_bin] with the specified binning options opt.

Parameters
Example

vsip_vview_f *src_vector_view; 
vsip_scalar_f min_bin = 0.0; 
vsip_scalar_f max_bin = 10.0; 
vsip_hist_opt hist_options = VSIP_HIST_ACCUM; 
vsip_vview_f *hist_vector_view; 
 
// Assuming src_vector_view and hist_vector_view have been properly initialized 
vsip_vhisto_f(src_vector_view, min_bin, max_bin, hist_options, hist_vector_view);