Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType > Class Template Reference

Parallel for functor for counting "buckets" in the FixedHashTable. More...

#include <Tpetra_Details_FixedHashTable_def.hpp>

Public Member Functions

 CountBuckets (const counts_view_type &counts, const keys_view_type &keys, const size_type size)
 Constructor. More...
 
KOKKOS_INLINE_FUNCTION void operator() (const size_type &i) const
 Do this for every entry of keys_. More...
 
KOKKOS_INLINE_FUNCTION void operator() (const size_type &i, value_type &dst) const
 Debug reduce version of above operator(). More...
 
KOKKOS_INLINE_FUNCTION void init (value_type &dst) const
 Set the initial value of the reduction result. More...
 

Detailed Description

template<class CountsViewType, class KeysViewType, class SizeType = typename KeysViewType::size_type>
class Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType >

Parallel for functor for counting "buckets" in the FixedHashTable.

Template Parameters
CountsViewTypeType of the Kokkos::View specialization used to store the bucket counts; the output of this functor.
KeysViewTypeType of the Kokkos::View specialization used to store the keys; the input of this functor.
SizeTypeThe parallel loop index type; a built-in integer type. Defaults to the type of the input View's dimension. You may use a shorter type to improve performance.

Definition at line 104 of file Tpetra_Details_FixedHashTable_def.hpp.

Constructor & Destructor Documentation

template<class CountsViewType , class KeysViewType , class SizeType = typename KeysViewType::size_type>
Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType >::CountBuckets ( const counts_view_type &  counts,
const keys_view_type &  keys,
const size_type  size 
)
inline

Constructor.

Parameters
counts[out] (Preallocated) View of the bucket counts
keys[in] View of the keys
size[in] Number of buckets; length of counts

Definition at line 126 of file Tpetra_Details_FixedHashTable_def.hpp.

Member Function Documentation

template<class CountsViewType , class KeysViewType , class SizeType = typename KeysViewType::size_type>
KOKKOS_INLINE_FUNCTION void Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType >::operator() ( const size_type &  i) const
inline

Do this for every entry of keys_.

Count the number of keys in keys_ that hash to the same value.

Definition at line 139 of file Tpetra_Details_FixedHashTable_def.hpp.

template<class CountsViewType , class KeysViewType , class SizeType = typename KeysViewType::size_type>
KOKKOS_INLINE_FUNCTION void Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType >::operator() ( const size_type &  i,
value_type &  dst 
) const
inline

Debug reduce version of above operator().

Set dst to 1 on error (out-of-bounds hash value).

Definition at line 153 of file Tpetra_Details_FixedHashTable_def.hpp.

template<class CountsViewType , class KeysViewType , class SizeType = typename KeysViewType::size_type>
KOKKOS_INLINE_FUNCTION void Tpetra::Details::FHT::CountBuckets< CountsViewType, KeysViewType, SizeType >::init ( value_type &  dst) const
inline

Set the initial value of the reduction result.

Definition at line 170 of file Tpetra_Details_FixedHashTable_def.hpp.


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