This technical memo, which can be downloaded by clicking on the buttons at the bottom of this page, looks at how the same signal processing algorithm might be coded using several different, mostly C-based, libraries. The purpose is to compare the source coding complexity of the different implementations and see how VSIP stacks up. We do not address performance, though we think a good VSIP implementation would perform comparably to existing commercial products.
The Algorithm
The algorithm is representative of the calculations involved in space-time adaptive processing (STAP) with radar or sonar arrays. Beginning with a 1D complex data vector, it forms a covariance matrix, computes spatial and temporal steering vectors, and solves a system of linear equations.
The Code Examples
After a brief tutorial introduction, the algorithm is specified by a MATLAB code fragment. We then show how that MATLAB code fragment would likely be translated into four library-based C language APIs: the proposed VSIP standard, and the existing commercial libraries of Mercury Computers, Sky Computers, and CSPI. A fifth implementation of this class, using the Sonar Middleware Standard, has not yet been completed. Also included is the C code produced directly from the MATLAB fragment using Mathworks’ MATLAB-to-C compiler.
In the near future, C++ may become more common in the signal processing arena. We therefore include two C++ codings of the MATLAB fragment. One is the output of MathTools’ MATCOM MATLAB-to-C++ compiler, while the other is based on a very early version of a proposed VSIP C++ binding.
The Main Result
The table below, which reproduces most of a similar table in the technical memo, shows the number of lines of source code (SLOC) for each implementation, including some breakdown of the SLOC into setup, control, and computation (SLOC-counting rules and additional details are given in the full memo). Note that VSIP requires no more code than existing commercial signal processing libraries; yet a VSIP implementation will be portable across the hardware products of each adopting vendor, while still allowing the underlying implementation to be optimized for each vendor’s architecture and development tools. Looking to the future, it appears that a C++ binding for VSIP may be able to combine the simplicity of the original MATLAB with the optimized performance of C-based libraries.
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
| C Implementations | ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| C++ Implementations | ||||
|
|
|
|
|
|
|
|
|
|
|
|
Viewing the Complete Technical Memo
The complete technical memo, including all of the code examples, is 31 pages long and includes a little bit of color. Click on the appropriate icon below to view the memo. If you need an Adobe pdf or Microsoft Word viewer, return to the home page to download one.