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/char_to_short_impl.cc | |
parent | 78431dc6941e3acc67c858277dfe4a0ed583643c (diff) |
Tree: clang-format without the include sorting
Diffstat (limited to 'gr-blocks/lib/char_to_short_impl.cc')
-rw-r--r-- | gr-blocks/lib/char_to_short_impl.cc | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/gr-blocks/lib/char_to_short_impl.cc b/gr-blocks/lib/char_to_short_impl.cc index fa8d55fbd0..f75e5b7c84 100644 --- a/gr-blocks/lib/char_to_short_impl.cc +++ b/gr-blocks/lib/char_to_short_impl.cc @@ -29,36 +29,34 @@ #include <volk/volk.h> namespace gr { - namespace blocks { - - char_to_short::sptr char_to_short::make(size_t vlen) - { - return gnuradio::get_initial_sptr(new char_to_short_impl(vlen)); - } - - char_to_short_impl::char_to_short_impl(size_t vlen) - : sync_block("char_to_short", - io_signature::make(1, 1, sizeof(char)*vlen), - io_signature::make(1, 1, sizeof(short)*vlen)), - d_vlen(vlen) - { - const int alignment_multiple = - volk_get_alignment() / sizeof(short); - set_alignment(std::max(1, alignment_multiple)); - } - - int - char_to_short_impl::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) - { - const int8_t *in = (const int8_t *)input_items[0]; - int16_t *out = (int16_t *)output_items[0]; - - volk_8i_convert_16i(out, in, d_vlen*noutput_items); - - return noutput_items; - } - - } /* namespace blocks */ -}/* namespace gr */ +namespace blocks { + +char_to_short::sptr char_to_short::make(size_t vlen) +{ + return gnuradio::get_initial_sptr(new char_to_short_impl(vlen)); +} + +char_to_short_impl::char_to_short_impl(size_t vlen) + : sync_block("char_to_short", + io_signature::make(1, 1, sizeof(char) * vlen), + io_signature::make(1, 1, sizeof(short) * vlen)), + d_vlen(vlen) +{ + const int alignment_multiple = volk_get_alignment() / sizeof(short); + set_alignment(std::max(1, alignment_multiple)); +} + +int char_to_short_impl::work(int noutput_items, + gr_vector_const_void_star& input_items, + gr_vector_void_star& output_items) +{ + const int8_t* in = (const int8_t*)input_items[0]; + int16_t* out = (int16_t*)output_items[0]; + + volk_8i_convert_16i(out, in, d_vlen * noutput_items); + + return noutput_items; +} + +} /* namespace blocks */ +} /* namespace gr */ |