filters.h File Reference
#include <cuda_runtime.h>
Include dependency graph for filters.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  params
 
struct  filter_arrays
 
struct  gpu_arrays
 
struct  cmd_args
 

Macros

#define CUDA_SHM   1
 Use shared memory GPU kernel. More...
 
#define SIZE_MUL   1
 Multiplier of 11 to derive filter length. More...
 
#define B_SIZE   11 * SIZE_MUL
 filter length More...
 
#define A_SIZE   (B_SIZE - 1)
 For IIR filter. not used currently. More...
 
#define OFFSET   20
 Offset for CPU filter input buffer. More...
 
#define MAX_RATES   10
 Maximum number of sampling rates. More...
 
#define MAX_FILTERS   1024
 Maximum number of filters. More...
 

Functions

void compute_ref (float *h_in[], float *h_reference[], gpu_arrays *gpuarrays, params *gparams, cmd_args *args, filter_arrays *farr, int N)
 
void compute_omp (float *h_in[], float *h_reference[], gpu_arrays *gpuarrays, params *gparams, cmd_args *args, filter_arrays *farr, int N)
 
void check_results (float *h_reference[], float *h_out[], gpu_arrays *gpuarrays, params *gparams, int N)
 
void read_command_line (int argc, char *argv[], cmd_args *args)
 
void print_usage ()
 

Variables

static int rdiv [MAX_RATES] = {2, 10, 50, 4, 16, 32, 8, 24, 36, 42}
 Decimation factors for multiple input rates. More...
 

Macro Definition Documentation

#define A_SIZE   (B_SIZE - 1)

For IIR filter. not used currently.

Definition at line 30 of file filters.h.

#define B_SIZE   11 * SIZE_MUL

filter length

Definition at line 28 of file filters.h.

#define CUDA_SHM   1

Use shared memory GPU kernel.

Definition at line 25 of file filters.h.

#define MAX_FILTERS   1024

Maximum number of filters.

Definition at line 35 of file filters.h.

#define MAX_RATES   10

Maximum number of sampling rates.

Definition at line 34 of file filters.h.

#define OFFSET   20

Offset for CPU filter input buffer.

Definition at line 32 of file filters.h.

#define SIZE_MUL   1

Multiplier of 11 to derive filter length.

Definition at line 27 of file filters.h.

Function Documentation

void check_results ( float *  h_reference[],
float *  h_out[],
gpu_arrays gpuarrays,
params gparams,
int  N 
)

Check the relative error between CPU and GPU filter computation results

Parameters
h_inarray containing all input blocks of the MR filter
h_referencearray containing the MR filter CPU output
h_outarray containing the MR filter GPU output
gpuarraysstructure containg the gpu arrays and parameters
gparamssructure containg parameters
Nthe number of input blocks to be processed.

Definition at line 188 of file filters_host.cpp.

void compute_omp ( float *  h_in[],
float *  h_reference[],
gpu_arrays gpuarrays,
params gparams,
cmd_args args,
filter_arrays farr,
int  N 
)

Execution of the multirate filter configuration with OpenMP.

Parameters
h_inarray containing all input blocks of the MR filter
h_referencearray containing the MR filter output
gpuarraysstructure containg the gpu arrays and parameters
gparamssructure containg parameters
argsstructure containing command line arguments
farrstructure containg the filters
Nthe number of input blocks to be processed.

Definition at line 123 of file filters_host.cpp.

void compute_ref ( float *  h_in[],
float *  h_reference[],
gpu_arrays gpuarrays,
params gparams,
cmd_args args,
filter_arrays farr,
int  N 
)

Execution of the multirate filter configuration serially.

Parameters
h_inarray containing all input blocks of the MR filter
h_referencearray containing the MR filter output
gpuarraysstructure containg the gpu arrays and parameters
gparamssructure containg parameters
argsstructure containing command line arguments
farrstructure containg the filters
Nthe number of input blocks to be processed.

Definition at line 69 of file filters_host.cpp.

void print_usage ( )

Print command line usage.

Definition at line 314 of file filters_host.cpp.

void read_command_line ( int  argc,
char *  argv[],
cmd_args args 
)

Read arguments from command line

Definition at line 231 of file filters_host.cpp.

Variable Documentation

int rdiv[MAX_RATES] = {2, 10, 50, 4, 16, 32, 8, 24, 36, 42}
static

Decimation factors for multiple input rates.

Definition at line 75 of file filters.h.