filters_host.cpp File Reference
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <getopt.h>
#include <sys/time.h>
#include <omp.h>
#include "filters.h"
Include dependency graph for filters_host.cpp:

Go to the source code of this file.

Functions

void filterCpuFir (float *out, float *in, filter_arrays *farr, int n, int nf)
 
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 ()
 

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 filterCpuFir ( float *  out,
float *  in,
filter_arrays farr,
int  n,
int  nf 
)

Basic serial implementation of an FIR filter. Based on the Tipic Vamp plugin .

Parameters
outthe output array from a single filter
inthe input array
farrstructure containing filter object
nlength of input/output
nfthe number of the filter being processed

Definition at line 30 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.