Tpetra Matrix/Vector Services  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Static Public Member Functions
Tpetra::Details::MapMirrorer< OutMapType, DeviceMapType, HostMapType > Class Template Reference

Return a mirror of either deviceMap or hostMap for a possibly different output device type. More...

#include <Tpetra_KokkosRefactor_Details_Map.hpp>

List of all members.

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.

Detailed Description

template<class OutMapType, class DeviceMapType, class HostMapType>
class Tpetra::Details::MapMirrorer< OutMapType, DeviceMapType, HostMapType >

Return a mirror of either deviceMap or hostMap for a possibly different output device type.

Template Parameters:
OutMapTypeA specialization of Map; the type of the return value of mirror().
DeviceMapTypeA specialization of Map; the type of the deviceMap input.
HostMapTypeA 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.


Member Function Documentation

template<class OutMapType, class DeviceMapType, class HostMapType>
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines