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);
This function retrieves the attributes of a 1D correlation object and stores them in the provided attribute structure.
const vsip_dcorr1d_p* cor: Pointer to the 1D correlation object created with vsip_dcorr1d_create_p .
vsip_dcorr1d_attr_p* attr: Pointer to the attribute structure where the correlation object attributes will be stored.
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);