Are filter objects supported for GPU in MATLAB 8.1 (R2013a)?

6 views (last 30 days)
I want to know if I can use filter objects for GPUs in MATLAB 8.1 (R2013a). I have the Jacket from AccelerEyes but their filter performance is slower than the MATLAB filter performance. I do not want to use the filter method. I want to use filter objects. Currently, I use the following filter command in matlab (CPUs only):
Hd_custom_cheby2 = fdesign.lowpass('N,Fst,Ast', N, high_limit, A_stop, Fs);
custom = design(Hd_custom_cheby2, 'cheby2','SystemObject',true);
filteredData = step(custom, data);
I want to know if I can do the same for GPUs.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Jul 2013
The MATLAB built-in FILTER command supports gpuArray inputs.
You can design the filter using the CHEBY2 function and then use the coefficients to filter data with the filter function. Please type the following command at the MATLAB command prompt to get a list of functions supported on a GPU:
>>methods('gpuArray')
MATLAB filter System objects do not support gpuArray inputs, however they support C-code generation which can also be used to speed up processing time. You will need MATLAB Coder for this. You can use FDESIGN to design a filter System object with coefficients that meet the filter specifications and then generate C code to process data with this filter. Please take a look at this documentation link for more information on building filters through a GUI:
<http://www.mathworks.com/help/signal/ug/opening-fdatool.html#btlste4-1>
Using this GUI you can get MATLAB code for a function that filters data and that can be converted to C code using the CODEGEN command. The documentation for CODEGEN command is here:
<http://www.mathworks.com/help/releases/R2013a/coder/ref/codegen.html>
The FILTER function on the GPU does not support IIR filters. Only FIR filters are supported with no input or output state. If you are using an IIR filter, the best way is try to do the filtering in the frequency domain. You can use FFT and IFFT functions that are supported on the GPU to implement this.

More Answers (0)

Products


Release

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!