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

5.2.3 vsip_dconv1d_getattr_p - Get 1D Convolution Object Attributes

typedef struct _vsip_conv1d_attr_f { 
  vsip_scalar_vi      kernel_len; // Kernel length 
  vsip_symmetry       symm;       // Symmetry 
  vsip_scalar_vi      data_len;   // Data length 
  vsip_support_region support;    // Support 
  vsip_scalar_vi      out_len;    // Output length 
  vsip_length         decimation; // Decimation 
} vsip_conv1d_attr_f; 
 
void vsip_conv1d_getattr_f(const vsip_conv1d_f *conv1d, vsip_conv1d_attr_f *attr);
Description

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

Parameters
Example

vsip_conv1d_f *conv; 
vsip_conv1d_attr_f attr; 
vsip_vview_f *h; 
vsip_length h_len = 31;  // Impulse response length 
vsip_length n = 1024;    // Input signal length 
 
// Create impulse response vector 
h = vsip_vcreate_f(h_len, VSIP_MEM_NONE); 
 
// Create convolution object 
conv = vsip_conv1d_create_f(h, VSIP_SYM_NONE, n, 1, 
                           VSIP_SUPPORT_FULL, 100, VSIP_ALG_TIME); 
if (conv == NULL) { 
    fprintf(stderr, "Error: Could not create convolution object\n"); 
    return; 
} 
 
// Get the attributes of the convolution object 
vsip_conv1d_getattr_f(conv, &attr); 
 
// Clean up 
vsip_conv1d_destroy_f(conv); 
vsip_valldestroy_f(h);