mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Reminder to my future self to not over-optimize complex conjugate multiply.
This commit is contained in:
parent
b8726b6ecf
commit
dc86db5b87
@ -40,6 +40,9 @@ static inline complex32_t multiply_conjugate_s16_s32(const complex16_t::rep_type
|
||||
// multiply: (a + bj) * (c + dj) = (ac - bd) + (bc + ad)j
|
||||
// conjugate-multiply: (ac + bd) + (bc - ad)j
|
||||
//return { a.real() * b.real() + a.imag() * b.imag(), a.imag() * b.real() - a.real() * b.imag() };
|
||||
// NOTE: Did not use combination of SMUAD and SMUSDX because of non-saturating arithmetic.
|
||||
// const int32_t r = __SMUAD(a, b);
|
||||
// const int32_t i = __SMUSDX(b, a);
|
||||
const int32_t rr = __SMULBB(a, b);
|
||||
const int32_t ii = __SMULTT(a, b);
|
||||
const int32_t r = __QADD(rr, ii);
|
||||
|
Loading…
Reference in New Issue
Block a user