Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/release_6.4.htm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h3>Changed functionality</h3>
<ul>
<li>
Compatibility with <a href="https://github.com/KUL-recon-lab/libparallelproj/">libparallelproj 2.0</a> and usage of CUDA managed pointers via
<a href="https://github.com/AMYPAD/cuvec">CuVec</a> for internal variables in our parallelproj interface and <code>CudaGibbsPenalty</code>.
<a href="https://github.com/AMYPAD/CuVec">CuVec</a> for internal variables in our parallelproj interface and <code>CudaGibbsPenalty</code>.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, URL's are not case specific, but as you prefer

This results in a ~20% speed-up, but also code simplification.
<br>
<a href=https://github.com/UCL/STIR/pull/1689>PR #1689</a>.
Expand Down
3 changes: 3 additions & 0 deletions src/include/stir/cuda_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ template <int num_dimensions, typename elemT>
inline void
array_to_device(CuVec<elemT>& dev_data, const Array<num_dimensions, elemT>& stir_array)
{
dev_data.resize(stir_array.size_all());
std::copy(stir_array.begin_all(), stir_array.end_all(), dev_data.begin());
}

Expand Down Expand Up @@ -127,6 +128,8 @@ array_to_host(Array<num_dimensions, elemT>& stir_array, const CuVec<elemT>& dev_
{
if (sync)
cudaDeviceSynchronize();
if (stir_array.size_all() != dev_data.size())
error("array_to_host: size mismatch between CuVec and Array");
std::copy(dev_data.begin(), dev_data.end(), stir_array.begin_all());
}

Expand Down
Loading