|
dspp
Digital Signal Processing library for C++
|
Specialize complex multiplication. More...
Functions | |
| std::complex< decltype(float()+float())> | operator* (const std::complex< float > &z, const std::complex< float > &w) |
| Limited range complex multiplication. | |
| std::complex< decltype(double()+float())> | operator* (const std::complex< double > &z, const std::complex< float > &w) |
| Limited range complex multiplication. | |
| std::complex< decltype(float()+double())> | operator* (const std::complex< float > &z, const std::complex< double > &w) |
| Limited range complex multiplication. | |
| std::complex< decltype(double()+double())> | operator* (const std::complex< double > &z, const std::complex< double > &w) |
| Limited range complex multiplication. | |
Specialize complex multiplication.
#include <dspp/util.hpp>
The ISO specification for C++ requires that complex multiplication check for NaN results and adjust for mathematical correctness. This is a significant performance problem for DSP algorithms which never use NaN or Inf. GCC has an option (-fcx-limited-range) to disable this but clang currently does not. Since we are allowed to specialize existing functions in std we can fix this for all compilers. If parts of your application require the ISO rules then make sure you are not including any dspp headers in that compilation unit.
1.8.7