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.6 vsip_dcorr1d_destroy_p - Destroy 1D Correlation Object

int vsip_corr1d_destroy_f(vsip_corr1d_f *cor); 
int vsip_ccorr1d_destroy_f(vsip_ccorr1d_f *cor);
Description

This function releases all memory and resources associated with a 1D correlation object that was previously created with vsip_dcorr1d_create_p . It is essential to call this function when you no longer need the correlation object to prevent memory leaks in your signal processing applications.

Parameters
Return Value
Example

vsip_corr1d_f *corr; 
int status; 
vsip_length m = 1024;  // Input signal length 
vsip_length n = 64;    // Reference signal length 
 
// Create correlation object 
corr = vsip_corr1d_create_f(m, n, VSIP_SUPPORT_FULL, 100, 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); 
 
// Destroy correlation object when done 
vsip_corr1d_destroy_f(corr);