template<typename Tin, int Zin, typename Tout, int Zout, int Gn, int Gd>
struct leansdr::cconverter< Tin, Zin, Tout, Zout, Gn, Gd >
Definition at line 34 of file dsp.h.
template<typename Tin , int Zin, typename Tout , int Zout, int Gn, int Gd>
Reimplemented from leansdr::runnable_common.
Definition at line 42 of file dsp.h.
References leansdr::complex< T >::im, leansdr::cconverter< Tin, Zin, Tout, Zout, Gn, Gd >::in, leansdr::min(), leansdr::cconverter< Tin, Zin, Tout, Zout, Gn, Gd >::out, and leansdr::complex< T >::re.
44 unsigned long count =
min(
in.readable(),
out.writable());
45 complex<Tin> *pin =
in.rd(), *pend = pin + count;
46 complex<Tout> *pout =
out.wr();
47 for (; pin < pend; ++pin, ++pout)
49 pout->re = Zout + (pin->re - (Tin)Zin) * Gn / Gd;
50 pout->im = Zout + (pin->im - (Tin)Zin) * Gn / Gd;
pipewriter< complex< Tout > > out
pipereader< complex< Tin > > in
T min(const T &x, const T &y)