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

Fix copy to spillover buffer

parent 7741eefa
No related branches found
No related tags found
No related merge requests found
......@@ -219,8 +219,8 @@ bool VLBI<HandlerType>::operator()(RawBytes &block) {
BOOST_LOG_TRIVIAL(debug) << " Copying remaining " << remainingBytes
<< " bytes for first block";
// cuda memcopy remainder of first block
CUDA_ERROR_CHECK(cudaMemcpyAsync(static_cast<void *>(_packed_voltage.a_ptr()),
static_cast<void *>(_outputBuffer.a_ptr()),
CUDA_ERROR_CHECK(cudaMemcpyAsync(static_cast<void *>(_outputBuffer.a_ptr() + vlbiHeaderSize + _spillOver.size()),
static_cast<void *>(_packed_voltage.a_ptr()),
remainingBytes, cudaMemcpyDeviceToHost,
_d2h_stream));
......@@ -229,7 +229,7 @@ bool VLBI<HandlerType>::operator()(RawBytes &block) {
const size_t width = outputBlockSize;
size_t height = numberOfBlocksInOutput;
BOOST_LOG_TRIVIAL(debug) << " Copying " << numberOfBlocksInOutput
BOOST_LOG_TRIVIAL(debug) << " Copying " << height
<< " blocks a " << outputBlockSize << " bytes";
// we now have a full first block, pitch copy rest leaving room for the header
CUDA_ERROR_CHECK(cudaMemcpy2DAsync(
......@@ -248,8 +248,8 @@ bool VLBI<HandlerType>::operator()(RawBytes &block) {
<< " bytes with offset " << offset;
CUDA_ERROR_CHECK(cudaMemcpyAsync(
static_cast<void *>(_packed_voltage.a_ptr() + offset),
static_cast<void *>(thrust::raw_pointer_cast(_spillOver.data())),
static_cast<void *>(_packed_voltage.a_ptr() + offset),
_spillOver.size(), cudaMemcpyDeviceToHost, _d2h_stream));
// fill in header data
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment