API reference
heliaDSP’s C API in 2.0.0 is CMSIS-DSP’s C API at the qualified CMSIS-DSP commit, with Arm’s function signatures and public types unchanged. CMSIS-DSP is Arm’s C library of signal-processing and numerical functions for Cortex-M; the qualified CMSIS-DSP commit is the one commit of Ambiq’s upstream-tracking fork AmbiqAI/CMSIS-DSP that heliaDSP builds. 2.0.0 adds no operation of its own.
The release is available to the preprocessor as the integer macros HELIA_DSP_VERSION_MAJOR, HELIA_DSP_VERSION_MINOR and HELIA_DSP_VERSION_PATCH, defined for every source that links nsx::helia_dsp and, under Zephyr, for every source in an image with CONFIG_HELIA_DSP=y; for example #if HELIA_DSP_VERSION_MAJOR == 2 && HELIA_DSP_VERSION_MINOR >= 1.
CMSIS-DSP functions (arm_*)
Section titled “CMSIS-DSP functions (arm_*)”Arm’s reference documentation for CMSIS-DSP v1.18.0 is at arm-software.github.io/CMSIS-DSP/v1.18.0. The qualified CMSIS-DSP commit is based on Arm’s v1.18.0 plus four commits, so that version is the closest one Arm documents; the declarations in the tree are authoritative for a heliaDSP release. The navigation of Arm’s v1.18.0 pages has no entry for the function reference, so the table below links each group’s page.
An application includes one header:
#include "arm_math.h"which includes the per-group declarations in third_party/CMSIS-DSP/Include/dsp/:
| Header | Functions | Arm’s reference |
|---|---|---|
basic_math_functions.h |
Element-wise add, subtract, multiply, scale, absolute value, dot product, shifts | Basic math |
fast_math_functions.h |
Sine, cosine, square root, exponential, logarithm, division | Fast math |
complex_math_functions.h |
Complex conjugate, magnitude, multiply, dot product | Complex math |
filtering_functions.h |
FIR (including decimating, interpolating and lattice), biquad cascades, convolution, correlation, LMS | Filtering |
transform_functions.h |
Complex and real FFT, MFCC | Transforms |
matrix_functions.h |
Matrix add, multiply, transpose, inverse, matrix-vector product, decompositions | Matrix |
statistics_functions.h |
Mean, variance, RMS, minimum, maximum, entropy | Statistics |
support_functions.h |
Copy, fill, type conversion, sorting | Support |
interpolation_functions.h |
Linear, bilinear and spline interpolation | Interpolation |
controller_functions.h |
PID controller, Clarke and Park transforms | Controller |
window_functions.h |
Window functions | Window |
distance_functions.h, bayes_functions.h, svm_functions.h |
Distance measures, naive Bayes and SVM classifiers | distance, Bayes, SVM |
quaternion_math_functions.h |
Quaternion arithmetic and conversion | Quaternion math |
Most groups have an f16 counterpart (*_f16.h); the f16 declarations are absent when DISABLEFLOAT16 is defined. Some declarations differ between Helium builds and other builds, notably the biquad’s Helium initializer; Contracts lists those for the functions Ambiq has measured or tested.
Function names follow Arm’s pattern arm_<operation>_<type>, with types f64, f32, f16, q31, q15 and q7; q31, q15 and q7 are fixed-point formats with 31, 15 and 7 fractional bits.
Arm’s C++ template library (dsppp/Include) is part of the qualified CMSIS-DSP commit; heliaDSP does not test it.
heliaDSP operations (helia_*)
Section titled “heliaDSP operations (helia_*)”An operation that CMSIS-DSP does not provide, or an implementation that needs a contract different from Arm’s, takes a helia_* name and heliaDSP-owned types. Its public header is in helia/include/helia/ and its sources in helia/src/. Each operation documents its contract at its declaration: supported sizes and types, data layout, the size of every caller-owned buffer, alignment and padding, which buffers may overlap or are modified, and its numerical behaviour. Selection among implementations of a heliaDSP operation is made before the build: each variant has its own named entry point, and no process function chooses among variants at run time. For the wavelet transform, helia_dwt_forward_f32 and helia_dwt_inverse_f32 run the Helium implementation on targets with floating-point MVE unless AUTOVECTORIZE=ON, and the optimized scalar implementation otherwise, as fixed when the library is compiled; helia_dwt_forward_scalar_f32 and helia_dwt_inverse_scalar_f32 run the optimized scalar implementation, and helia_dwt_reference_forward_f32 and helia_dwt_reference_inverse_f32 the reference, on every target. The window statistics follow the same convention with helia_window_stats_f32, helia_window_stats_scalar_f32 and helia_window_stats_reference_f32.
The documentation site lists every declaration in these headers, generated from them: C API.
| Header | Operation |
|---|---|
helia/helia_dwt.h |
Forward and inverse periodic discrete wavelet transform, f32, bior4.4 and Coif5: Discrete wavelet transform |
helia/helia_window_stats.h |
Count, sum, sum of squares, minimum and maximum of an f32 window in one traversal, and the mean, variances and RMS derived from them: Window statistics |
An application includes the operation’s header:
#include "helia/helia_dwt.h"Python
Section titled “Python”cmsisdsp, Arm’s Python package, builds from the qualified CMSIS-DSP commit, and heliadsp from helia/python; both are for function-level prototyping on a host and are described in Python. In 2.0.0, heliadsp exposes only its version and the qualified CMSIS-DSP commit; from 2.1.0 each helia_* family is a module heliadsp.<family>, listed in the Python section of the family’s page.