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.7 vsip_dcorr1d_getattr_p - Get 1D Correlation Object Attributes

typedef struct _vsip_corr1d_attr_f { 
  vsip_scalar_vi      ref_len;  // Reference length 
  vsip_scalar_vi      data_len; // Data length 
  vsip_support_region support;  // Support type 
  vsip_scalar_vi      lag_len;  // Lag length 
} vsip_corr1d_attr_f; 
 
/* same for ccorr1d */ 
typedef vsip_corr1d_attr_f vsip_ccorr1d_attr_f; 
 
void vsip_corr1d_getattr_f(const vsip_corr1d_f *cor, vsip_corr1d_attr_f *attr); 
void vsip_ccorr1d_getattr_f(const vsip_ccorr1d_f *cor, vsip_ccorr1d_attr_f *attr);
Description

This function retrieves the attributes of a 1D correlation object and stores them in the provided attribute structure.

Parameters
Example

vsip_corr1d_f *corr; 
vsip_corr1d_attr_f attr; 
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; 
} 
 
// Get the attributes of the correlation object 
vsip_corr1d_getattr_f(corr, &attr); 
 
printf("1D Correlation Object Attributes:\n"); 
printf("  Ref length: %lu\n", attr.ref_len); 
printf("  Data length: %lu\n", attr.data_len); 
printf("  Support region: %d\n", attr.support); 
printf("  Lag length: %lu\n", attr.lag_len); 
 
// Clean up 
vsip_corr1d_destroy_f(corr);