Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Helper class for copying setup-time Collection groups to host and device. More...
#include <CollectionMirror.hh>
Public Types | |
Type aliases | |
using | HostValue = celeritas::HostVal< P > |
using | HostRef = celeritas::HostCRef< P > |
using | DeviceRef = celeritas::DeviceCRef< P > |
![]() | |
using | HostRef = HostCRef< P > |
using | DeviceRef = DeviceCRef< P > |
Public Member Functions | |
CollectionMirror ()=default | |
Default constructor leaves in an "unassigned" state. | |
CollectionMirror (HostValue &&host) | |
Construct with defaults. | |
operator bool () const | |
Whether the data is assigned. | |
HostRef const & | host_ref () const final |
Access data on host. | |
DeviceRef const & | device_ref () const final |
Access data on device. | |
![]() | |
template<MemSpace M> | |
P< Ownership::const_reference, M > const & | ref () const |
template<MemSpace M> | |
P< Ownership::const_reference, M > const & | ref () const |
Dispatch a "ref" call to host or device data. | |
Additional Inherited Members | |
![]() | |
CELER_DEFAULT_COPY_MOVE (ParamsDataInterface) | |
Helper class for copying setup-time Collection groups to host and device.
This should generally be an implementation detail of Params classes, which are constructed on host and must have the same data both on host and device. The template P
must be a FooData
class that:
On assignment, it will copy the data to the device if the GPU is enabled.
Example:
|
inlinefinalvirtual |
Access data on device.
Implements celeritas::ParamsDataInterface< P >.
|
inlinefinalvirtual |
Access data on host.
Implements celeritas::ParamsDataInterface< P >.