Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

5.5.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);
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);