|
Tpetra Matrix/Vector Services
Version of the Day
|
Return a mirror of either deviceMap or hostMap for a possibly different output device type. More...
#include <Tpetra_KokkosRefactor_Details_Map.hpp>
Static Public Member Functions | |
| static output_map_type | mirror (device_map_type &deviceMap, host_map_type &hostMap) |
| Return a mirror copy of either deviceMap or hostMap. | |
Return a mirror of either deviceMap or hostMap for a possibly different output device type.
| OutMapType | A specialization of Map; the type of the return value of mirror(). |
| DeviceMapType | A specialization of Map; the type of the deviceMap input. |
| HostMapType | A specialization of Map; the type of the hostMap input. |
MapMirrorer's mirror() method returns a "mirror copy" of either deviceMap or hostMap. It assumes that both Maps represents the same distribution, just stored on possibly different devices. A "mirror copy" is a shallow copy if possible, else a deep copy. The method will favor the initialized Map, if one of deviceMap or hostMap is not initialized.
The mirror() method will only compile if all three Map types have the same first two template parameters (LO and GO).
If mirror() had to do work (a deep copy) to create the mirror, then we cache that work. This is why the input arguments are passed in as nonconst references.
Definition at line 1524 of file Tpetra_KokkosRefactor_Details_Map.hpp.
| static output_map_type Tpetra::Details::MapMirrorer< OutMapType, DeviceMapType, HostMapType >::mirror | ( | device_map_type & | deviceMap, |
| host_map_type & | hostMap | ||
| ) | [static] |
Return a mirror copy of either deviceMap or hostMap.
1.7.6.1