Skip to content
Snippets Groups Projects
Commit f3f91f4f authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Don't resize output type in unpacker to allow memory footprint tweaks

parent 47101561
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment