Tpetra Matrix/Vector Services  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType > Class Template Reference

Kokkos reduce functor for filling GID->LID table and computing min and max GID. More...

#include <Tpetra_KokkosRefactor_Details_Map.hpp>

List of all members.

Public Member Functions

 GlobalToLocalTableFiller (const Kokkos::UnorderedMap< GO, LO, DeviceType > &glMap, const Kokkos::View< const GO *, DeviceType > &entries, const GO firstContiguousGID, const GO lastContiguousGID)
 Constructor.
KOKKOS_INLINE_FUNCTION void init (value_type &dst) const
 Set the initial value of the reduction.
KOKKOS_INLINE_FUNCTION void join (volatile value_type &dst, const volatile value_type &src) const
 Combine two intermediate reduction results.
KOKKOS_INLINE_FUNCTION void operator() (const size_type i, value_type &dst) const
 Do this for every element of entries.

Detailed Description

template<class LO, class GO, class DeviceType>
class Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType >

Kokkos reduce functor for filling GID->LID table and computing min and max GID.

The functor is a reduce functor, not a for functor, because it also conveniently computes the min and max locally owned GID.

Definition at line 126 of file Tpetra_KokkosRefactor_Details_Map.hpp.


Constructor & Destructor Documentation

template<class LO , class GO , class DeviceType >
Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType >::GlobalToLocalTableFiller ( const Kokkos::UnorderedMap< GO, LO, DeviceType > &  glMap,
const Kokkos::View< const GO *, DeviceType > &  entries,
const GO  firstContiguousGID,
const GO  lastContiguousGID 
) [inline]

Constructor.

Parameters:
glMap[out] GID->LID table to fill; must already be preallocated with sufficient space.
entries[in] GIDs to put into GID->LID table. These are only the zero or more "noncontiguous GIDs" that follow the initial sequence of one or more contiguous GIDs [firstContiguousGID, lastContiguousGID].
firstContiguousGID[in] The first contiguous GID.
lastContiguousGID[in] The last contiguous GID.

Definition at line 142 of file Tpetra_KokkosRefactor_Details_Map.hpp.


Member Function Documentation

template<class LO , class GO , class DeviceType >
KOKKOS_INLINE_FUNCTION void Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType >::init ( value_type dst) const [inline]

Set the initial value of the reduction.

Pre-assign to minMyGID the first seen contiguous GID, and to maxMyGID the last seen contiguous GID. [first,last] form an inclusive range. Map's constructor (that takes a GID list) should not call this functor if the calling process owns no GIDs. Even if there is only one GID, that will be both the first and the last contiguous GID.

Definition at line 161 of file Tpetra_KokkosRefactor_Details_Map.hpp.

template<class LO , class GO , class DeviceType >
KOKKOS_INLINE_FUNCTION void Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType >::join ( volatile value_type dst,
const volatile value_type src 
) const [inline]

Combine two intermediate reduction results.

This sets both the min and max GID, if necessary.

Definition at line 173 of file Tpetra_KokkosRefactor_Details_Map.hpp.

template<class LO , class GO , class DeviceType >
KOKKOS_INLINE_FUNCTION void Tpetra::Details::GlobalToLocalTableFiller< LO, GO, DeviceType >::operator() ( const size_type  i,
value_type dst 
) const [inline]

Do this for every element of entries.

Add (entries_(i), i) to the GID->LID lookup table, and update the min and max GID seen thus far in entries.

Definition at line 191 of file Tpetra_KokkosRefactor_Details_Map.hpp.


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