|
|
||||||||||||||||||||||||||
About VSIPL++
Manuals
Mailing Lists
|
Comparing Sourcery VSIPL++ to VSIPLSourcery VSIPL++ provides substantial productivity advantages relative to the VSIPL API. Using Sourcery VSIPL++, you will write only one third as much code to implement typical signal-processing algorithms. (While this page is focused on the productivity advantages, using Sourcery VSIPL++ has other advantages too: it is much easier to make your application run in parallel, and, in some cases, you will get superior performance.) This page provides implementations of "pulse-compression" (a building block of many signal-processing algorithms) using Sourcery VSIPL++ and the VSIPL API. Pulse compression consists of three steps. First, an FFT is applied to transform time-domain data into frequency-domain data. Then, a vector-matrix multiply is performed in the frequency domain. Finally, an inverse FFT is applied to return to the time domain. Sourcery VSIPL++ ImplementationWith Sourcery VSIPL++, the entire algorithm can be expressed in just seven statements: three set-up statements, two statements to declare the forward and inverse FFTs, and two to perform the actual computation.
VSIPL API ImplementationThe VSIPL implementation of the same algorithm requires nineteen statements — three times that required for the Sourcery VSIPL++ implementation. The VSIPL++ API allows the user to write the core computation in fewer statements than VSIPL. And, VSIPL++ requires many fewer statements because the VSIPL++ API supports automatic memory allocation. (Of course, you can still control memory allocation manually if necessary.)
Working with Multiple PrecisionsThe Sourcery VSIPL++ implementation has a further productivity advantage that is not obvious from the examples above. Suppose that you want to perform pulse-compression on both single-precision and double-precision data. Or, suppose that you want to experiment with using different precisions to see how they affect accurancy and performance. To modify the single-precision VSIPL code shown above to use double-precision, you must change the suffixes of the functions used from _f to _d. This change is simple in concept, but time-consuming and error-prone. And, you may need to maintain both routines for the life of your application. In Sourcery VSIPL++, no change to the code is required, due to the use of C++ templates. The same function can be used whether in, out, and ref are single-precision or double-precision matrices. There's nothing to change, and you only need to maintain one copy of the algorithm. |
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||