#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "vcsbeam.h"
#include "gpu_macros.h"
|
gpuDoubleComplex * | roots_of_unity (int N) |
| Calculates complex roots of unity. More...
|
|
void | vmLoadFilter (vcsbeam_context *vm, char *filtername, filter_type type, int nchans) |
| Load a set of filter coefficients. More...
|
|
void | vmScaleFilterCoeffs (vcsbeam_context *vm, filter_type type, double scale_factor) |
| Scale the filter coefficients by constant factor. More...
|
|
void | free_pfb_filter (pfb_filter *filter) |
| Free the memory associated with a PFB filter. More...
|
|
◆ free_pfb_filter()
void free_pfb_filter |
( |
pfb_filter * |
filter | ) |
|
Free the memory associated with a PFB filter.
- Parameters
-
filter | The filter to be freed/ |
This function frees both the member variables and the filter itself.
◆ roots_of_unity()
gpuDoubleComplex* roots_of_unity |
( |
int |
N | ) |
|
Calculates complex roots of unity.
- Parameters
-
N | The number of roots to calculate |
- Returns
- A list of all complex numbers \(z\) such that \(z^N = 1\).
◆ vmLoadFilter()
void vmLoadFilter |
( |
vcsbeam_context * |
vm, |
|
|
char * |
filtername, |
|
|
filter_type |
type, |
|
|
int |
nchans |
|
) |
| |
Load a set of filter coefficients.
- Parameters
-
vm | The VCSBeam context struct |
filtername | String specifying a filter. There should be a corresponding file in the RUNTIME_DIR called <filtername>.dat . |
type | Either ANALYSIS_FILTER or SYNTHESIS_FILTER |
nchans | The number of channels that this filter will be applied to. For both ANALYSIS and SYNTHESIS filters, this should be the number of ANALYSIS channels. |
- Todo:
- Change nchans so that it uses
vm→nfine_chans
◆ vmScaleFilterCoeffs()
void vmScaleFilterCoeffs |
( |
vcsbeam_context * |
vm, |
|
|
filter_type |
type, |
|
|
double |
scale_factor |
|
) |
| |
Scale the filter coefficients by constant factor.
- Parameters
-
vm | The VCSBeam context struct |
type | Either ANALYSIS_FILTER or SYNTHESIS_FILTER |
scale_factor | The scaling factor |