mirror of
https://github.com/hb9fxq/gr-digitalhf
synced 2024-11-05 05:55:53 +00:00
&vec.front() -> vec.data()
This commit is contained in:
parent
dac2e9e080
commit
a26686f0fd
|
@ -208,9 +208,9 @@ adaptive_dfe_impl::general_work(int noutput_items,
|
|||
#endif
|
||||
}
|
||||
assert(i+_nF < nin && i-1-_nB >= 0);
|
||||
out_symb[nout] = filter(&_rotated_samples.front() + i - _nB,
|
||||
&_rotated_samples.front() + i + _nF+1);
|
||||
std::memcpy(&out_taps[(_nB+_nF+1)*nout], &_taps_samples.front(), (_nB+_nF+1)*sizeof(gr_complex));
|
||||
out_symb[nout] = filter(_rotated_samples.data() + i - _nB,
|
||||
_rotated_samples.data() + i + _nF+1);
|
||||
std::memcpy(&out_taps[(_nB+_nF+1)*nout], _taps_samples.data(), (_nB+_nF+1)*sizeof(gr_complex));
|
||||
++nout;
|
||||
} // next sample
|
||||
consume(0, ninput_processed);
|
||||
|
@ -254,7 +254,7 @@ gr_complex adaptive_dfe_impl::filter(gr_complex const* start, gr_complex const*
|
|||
// (1a) taps_samples
|
||||
volk_32fc_x2_dot_prod_32fc(&filter_output,
|
||||
start,
|
||||
&_taps_samples.front(),
|
||||
_taps_samples.data(),
|
||||
_nB+_nF+1);
|
||||
// (1b) taps_symbols
|
||||
gr_complex dot_symbols(0);
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace digitalhf {
|
|||
class filter_update : private boost::noncopyable {
|
||||
public:
|
||||
typedef std::unique_ptr<filter_update> sptr;
|
||||
virtual ~filter_update() {}
|
||||
|
||||
virtual void reset() = 0;
|
||||
virtual gr_complex const* update(gr_complex const*, gr_complex const*) = 0;
|
||||
|
|
|
@ -40,7 +40,7 @@ gr_complex const* lms::update(gr_complex const* beg,
|
|||
volk_32fc_conjugate_32fc(&_tmp[0], beg, n);
|
||||
volk_32f_s32f_multiply_32f((float*)&_gain[0], (float const*)&_tmp[0], _mu, 2*n);
|
||||
|
||||
return &_gain.front();
|
||||
return _gain.data();
|
||||
}
|
||||
|
||||
void lms::set_parameters(std::map<std::string, float>const & p) {
|
||||
|
|
|
@ -46,7 +46,7 @@ gr_complex const* nlms::update(gr_complex const* beg,
|
|||
volk_32f_accumulator_s32f(&norm, &_t1[0], n);
|
||||
volk_32f_s32f_multiply_32f((float*)&_gain[0], (float const*)&_tmp[0], std::max(0.005f, _mu/norm), 2*n);
|
||||
|
||||
return &_gain.front();
|
||||
return _gain.data();
|
||||
}
|
||||
|
||||
void nlms::set_parameters(std::map<std::string, float>const & p) {
|
||||
|
|
|
@ -63,7 +63,7 @@ gr_complex const* rls::update(gr_complex const* beg,
|
|||
volk_32f_s32f_multiply_32f((float*)&_inv_corr[k], (float const*)&_inv_corr[k], 1.0f/_lambda, 2*n);
|
||||
}
|
||||
|
||||
return &_gain.front();
|
||||
return _gain.data();
|
||||
}
|
||||
|
||||
void rls::set_parameters(std::map<std::string, float> const& p) {
|
||||
|
|
Loading…
Reference in a new issue