mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 00:27:26 -05:00
#1021 Updates FIR filter to use the java Math.fma floating point multiply and accumulate instruction for more efficient processing. (#1022)
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -85,7 +85,8 @@ public class RealFIRFilter2 extends FIRFilter
|
||||
//Use vector dot product to leverage SIMD intrinsics
|
||||
for(int x = 0; x < mCoefficients.length; x++)
|
||||
{
|
||||
mAccumulator += mData[x] * mCoefficients[x];
|
||||
//Note: Math.fma() is 2.5x faster than explicit multiply then accumulate
|
||||
Math.fma(mData[x], mCoefficients[x], mAccumulator);
|
||||
}
|
||||
|
||||
/* Apply gain and return the filtered value */
|
||||
|
||||
Reference in New Issue
Block a user