diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2019-08-07 21:45:12 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-08-09 23:04:28 +0200 |
commit | f7bbf2c1d8d780294f3e016aff239ca35eb6516e (patch) | |
tree | e09ab6112e02b2215b2d59ac24d3d6ea2edac745 /gr-blocks/lib/complex_to_arg_impl.cc | |
parent | 78431dc6941e3acc67c858277dfe4a0ed583643c (diff) |
Tree: clang-format without the include sorting
Diffstat (limited to 'gr-blocks/lib/complex_to_arg_impl.cc')
-rw-r--r-- | gr-blocks/lib/complex_to_arg_impl.cc | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/gr-blocks/lib/complex_to_arg_impl.cc b/gr-blocks/lib/complex_to_arg_impl.cc index ab92c08b3b..8f5bf61c81 100644 --- a/gr-blocks/lib/complex_to_arg_impl.cc +++ b/gr-blocks/lib/complex_to_arg_impl.cc @@ -30,41 +30,39 @@ #include <gnuradio/math.h> namespace gr { - namespace blocks { +namespace blocks { - complex_to_arg::sptr complex_to_arg::make(size_t vlen) - { - return gnuradio::get_initial_sptr(new complex_to_arg_impl(vlen)); - } - - complex_to_arg_impl::complex_to_arg_impl(size_t vlen) - : sync_block("complex_to_arg", - io_signature::make (1, 1, sizeof(gr_complex)*vlen), - io_signature::make (1, 1, sizeof(float)*vlen)), - d_vlen(vlen) - { - const int alignment_multiple = - volk_get_alignment() / sizeof(float); - set_alignment(std::max(1,alignment_multiple)); - } +complex_to_arg::sptr complex_to_arg::make(size_t vlen) +{ + return gnuradio::get_initial_sptr(new complex_to_arg_impl(vlen)); +} - int - complex_to_arg_impl::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) - { - const gr_complex *in = (const gr_complex *) input_items[0]; - float *out = (float *) output_items[0]; - int noi = noutput_items * d_vlen; +complex_to_arg_impl::complex_to_arg_impl(size_t vlen) + : sync_block("complex_to_arg", + io_signature::make(1, 1, sizeof(gr_complex) * vlen), + io_signature::make(1, 1, sizeof(float) * vlen)), + d_vlen(vlen) +{ + const int alignment_multiple = volk_get_alignment() / sizeof(float); + set_alignment(std::max(1, alignment_multiple)); +} - // The fast_atan2f is faster than Volk - for (int i = 0; i < noi; i++){ - // out[i] = std::arg (in[i]); - out[i] = gr::fast_atan2f(in[i]); - } +int complex_to_arg_impl::work(int noutput_items, + gr_vector_const_void_star& input_items, + gr_vector_void_star& output_items) +{ + const gr_complex* in = (const gr_complex*)input_items[0]; + float* out = (float*)output_items[0]; + int noi = noutput_items * d_vlen; - return noutput_items; + // The fast_atan2f is faster than Volk + for (int i = 0; i < noi; i++) { + // out[i] = std::arg (in[i]); + out[i] = gr::fast_atan2f(in[i]); } - } /* namespace blocks */ -}/* namespace gr */ + return noutput_items; +} + +} /* namespace blocks */ +} /* namespace gr */ |