MCPcopy Create free account
hub / github.com/LabSound/LabSound / multiply

Method multiply

src/internal/src/FFTFrameKissFFT.cpp:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void FFTFrame::multiply(const FFTFrame & frame)
76{
77 FFTFrame & frame1 = *this;
78 FFTFrame & frame2 = const_cast<FFTFrame &>(frame);
79
80 float * realP1 = frame1.realData();
81 float * imagP1 = frame1.imagData();
82 const float * realP2 = frame2.realData();
83 const float * imagP2 = frame2.imagData();
84
85 unsigned halfSize = fftSize() / 2;
86 float real0 = realP1[0];
87 float imag0 = imagP1[0];
88 VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize);
89
90 // Multiply the packed DC/nyquist component
91 realP1[0] = real0 * realP2[0];
92 imagP1[0] = imag0 * imagP2[0];
93}
94
95void FFTFrame::computeForwardFFT(const float * data)
96{

Callers 1

processMethod · 0.45

Calls 3

zvmulFunction · 0.85
realDataMethod · 0.45
imagDataMethod · 0.45

Tested by

no test coverage detected