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.2.5 vsip_dcorr1d_create_p - Create 1D Correlation Object

typedef enum _vsip_support_region { 
  VSIP_SUPPORT_FULL = 0, 
  VSIP_SUPPORT_SAME = 1, 
  VSIP_SUPPORT_MIN  = 2, 
} vsip_support_region; 
 
typedef enum _vsip_alg_hint { 
  VSIP_ALG_TIME  = 0, 
  VSIP_ALG_SPACE = 1, 
  VSIP_ALG_NOISE = 2 
} vsip_alg_hint; 
 
vsip_corr1d_f* vsip_corr1d_create_f(vsip_length m, vsip_length n, vsip_support_region support, vsip_length ntimes, vsip_alg_hint hint); 
vsip_ccorr1d_f* vsip_ccorr1d_create_f(vsip_length m, vsip_length n, vsip_support_region support, vsip_length ntimes, vsip_alg_hint hint);
Description

This function creates a one-dimensional correlation object that can be used to compute the correlation between an input signal and a reference signal.

The correlation object is optimized for repeated use, allowing efficient computation of correlations between signals of length m and reference signals of length n.

Parameters
Return Value
Example

vsip_corr1d_f *corr; 
vsip_length m = 1024;  // Input signal length 
vsip_length n = 64;    // Reference signal length 
vsip_length ntimes = 100; // Number of times to reuse object 
 
// Create correlation object for full correlation 
corr = vsip_corr1d_create_f(m, n, VSIP_SUPPORT_FULL, ntimes, VSIP_ALG_TIME); 
if (corr == NULL) { 
    fprintf(stderr, "Error: Could not create correlation object\n"); 
    return -1; 
} 
 
// Use the correlation object for your signal processing 
// vsip_vview_f *input = vsip_vcreate_f(m, VSIP_MEM_NONE); 
// vsip_vview_f *reference = vsip_vcreate_f(n, VSIP_MEM_NONE); 
// vsip_vview_f *result = vsip_vcreate_f(m + n - 1, VSIP_MEM_NONE); 
// 
// vsip_corr1d_f(corr, input, reference, result); 
 
// Clean up when done 
vsip_corr1d_destroy_f(corr);
Notes