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.4.1 vsip_dfir_create_p - Create a FIR Filter

typedef enum _vsip_symmetry { 
  VSIP_NONSYM            = 0, 
  VSIP_SYM_EVEN_LEN_ODD  = 1, 
  VSIP_SYM_EVEN_LEN_EVEN = 2 
} vsip_symmetry; 
 
typedef enum _vsip_obj_state { 
  VSIP_STATE_NO_SAVE = 1, 
  VSIP_STATE_SAVE    = 2 
} vsip_obj_state; 
 
typedef enum _vsip_alg_hint { 
  VSIP_ALG_TIME  = 0, 
  VSIP_ALG_SPACE = 1, 
  VSIP_ALG_NOISE = 2 
} vsip_alg_hint; 
 
vsip_fir_f *vsip_fir_create_f(const vsip_vview_f *kernel, vsip_symmetry symm, 
                              vsip_length n, vsip_length d, 
                              vsip_obj_state state, 
                              vsip_length ntimes, vsip_alg_hint hint); 
vsip_cfir_f *vsip_cfir_create_f(const vsip_cvview_f *kernel, vsip_symmetry symm, 
                                vsip_length n, vsip_length d, 
                                vsip_obj_state state, 
                                vsip_length ntimes, vsip_alg_hint hint);
Description

This function creates a FIR (Finite Impulse Response) filter with the specified kernel, symmetry, length, decimation factor, state, number of times to apply the filter, and algorithm hint.

Parameters
Return Value
Example

vsip_vview_f *kernel_view; 
vsip_symmetry symm = VSIP_NONSYM; 
vsip_length length = 10; 
vsip_length decimation = 1; 
vsip_obj_state state = VSIP_STATE_SAVE; 
vsip_length ntimes = 1; 
vsip_alg_hint hint = VSIP_ALG_TIME; 
vsip_fir_f *fir_filter; 
 
// Assuming kernel_view has been properly initialized 
fir_filter = vsip_fir_create_f(kernel_view, symm, length, decimation, state, ntimes, hint); 
 
if (fir_filter == NULL) { 
    // Handle error 
}