Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::Copier< T, M > Class Template Reference

Copy spans of data. More...

#include <Copier.hh>

Public Member Functions

 Copier (Span< T > dst)
 Construct with the destination and the class's memspace.
 
 Copier (Span< T > dst, StreamId stream)
 Also construct with a stream ID to use for async copy.
 
void operator() (MemSpace srcmem, Span< T const > src) const
 Copy data from the given source and memory space.
 

Detailed Description

template<class T, MemSpace M>
class celeritas::Copier< T, M >

Copy spans of data.

The destination (which can be a reusable buffer) is the constructor argument, and the source of the data to copy is the function argument.

Example of copying data from device to host:

Copier<int, MemSpace::host> copy_to_host{host_ints};
copy_to_host(MemSpace::device, device_ints);
void copy_to_host(Collection< T, W, M, I > const &src, Span< T, E > dst)
Copy from the given collection to host.
Definition: CollectionAlgorithms.hh:58

The documentation for this class was generated from the following file: