From f3f91f4f63d812ceeb3b0baaffb4ce30fca81ce3 Mon Sep 17 00:00:00 2001 From: Tobias Winchen <tobias.winchen@rwth-aachen.de> Date: Mon, 23 Sep 2019 08:02:03 +0000 Subject: [PATCH] Don't resize output type in unpacker to allow memory footprint tweaks --- psrdada_cpp/effelsberg/edd/src/Unpacker.cu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/psrdada_cpp/effelsberg/edd/src/Unpacker.cu b/psrdada_cpp/effelsberg/edd/src/Unpacker.cu index dbb4a791..aae3004f 100644 --- a/psrdada_cpp/effelsberg/edd/src/Unpacker.cu +++ b/psrdada_cpp/effelsberg/edd/src/Unpacker.cu @@ -125,9 +125,9 @@ template <> void Unpacker::unpack<12>(InputType const& input, OutputType& output) { BOOST_LOG_TRIVIAL(debug) << "Unpacking 12-bit data"; - std::size_t output_size = input.size() * 16 / 3; - BOOST_LOG_TRIVIAL(debug) << "Resizing output buffer to " << output_size << " elements"; - output.resize(output_size); + //std::size_t output_size = input.size() * 16 / 3; + //BOOST_LOG_TRIVIAL(debug) << "Resizing output buffer to " << output_size << " elements"; + //output.resize(output_size); int nblocks = input.size() / EDD_NTHREADS_UNPACK; InputType::value_type const* input_ptr = thrust::raw_pointer_cast(input.data()); OutputType::value_type* output_ptr = thrust::raw_pointer_cast(output.data()); @@ -139,9 +139,9 @@ template <> void Unpacker::unpack<8>(InputType const& input, OutputType& output) { BOOST_LOG_TRIVIAL(debug) << "Unpacking 8-bit data"; - std::size_t output_size = input.size() * 8; - BOOST_LOG_TRIVIAL(debug) << "Resizing output buffer to " << output_size << " elements"; - output.resize(output_size); + //std::size_t output_size = input.size() * 8; + //BOOST_LOG_TRIVIAL(debug) << "Resizing output buffer to " << output_size << " elements"; + //output.resize(output_size); int nblocks = input.size() / EDD_NTHREADS_UNPACK; InputType::value_type const* input_ptr = thrust::raw_pointer_cast(input.data()); OutputType::value_type* output_ptr = thrust::raw_pointer_cast(output.data()); -- GitLab