Celeritas 0.7.0-33+develop.9c828abdd
Loading...
Searching...
No Matches
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 (ObserverPtr< T, M > dst, std::size_t size, StreamId stream)
 Construct with the destination, size, and stream for async copy.
 
 Copier (ObserverPtr< T, M > dst, StreamId stream)
 Construct with a single dst element.
 
 Copier (Span< T > dst, StreamId stream)
 Construct from a destination span and stream.
 
void operator() (MemSpace srcmem, Span< T const > src) const
 Copy data from the given source and memory space.
 
template<MemSpace M2>
void operator() (ObserverPtr< T const, M2 >) const
 Copy a single element of data from the given source and memory space.
 
template<MemSpace M2>
void operator() (ObserverPtr< T, M2 > src) const
 

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:

host_ints.size(),
copy_to_host(MemSpace::device, device_ints);
void copy_to_host(Collection< T, W, M, I > const &src, Span< T, E > dst, StreamId sid={})
Copy from the given collection to host.
Definition CollectionAlgorithms.hh:60
Copy spans of data.
Definition Copier.hh:44
Type-safe non-owning pointer.
Definition ObserverPtr.hh:34

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