Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
Kokkos::UnorderedMapInsertResult Class Reference

First element of the return value of UnorderedMap::insert(). More...

#include <Kokkos_UnorderedMap.hpp>

Public Member Functions

KOKKOS_FORCEINLINE_FUNCTION bool success () const
 Did the map successful insert the key/value pair. More...
 
KOKKOS_FORCEINLINE_FUNCTION bool existing () const
 Was the key already present in the map. More...
 
KOKKOS_FORCEINLINE_FUNCTION bool failed () const
 Did the map fail to insert the key due to insufficient capacity. More...
 
KOKKOS_FORCEINLINE_FUNCTION bool freed_existing () const
 
KOKKOS_FORCEINLINE_FUNCTION
uint32_t 
list_position () const
 
KOKKOS_FORCEINLINE_FUNCTION
uint32_t 
index () const
 Index where the key can be found as long as the insert did not fail. More...
 

Detailed Description

First element of the return value of UnorderedMap::insert().

Inserting an element into an UnorderedMap is not guaranteed to succeed. There are three possible conditions:

  1. INSERT_FAILED: The insert failed. This usually means that the UnorderedMap ran out of space.
  2. INSERT_SUCCESS: The insert succeeded, and the key did not exist in the table before.
  3. INSERT_EXISTING: The insert succeeded, and the key did exist in the table before. The new value was ignored and the old value was left in place.

Definition at line 59 of file Kokkos_UnorderedMap.hpp.

Member Function Documentation

KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::UnorderedMapInsertResult::success ( ) const
inline

Did the map successful insert the key/value pair.

Definition at line 71 of file Kokkos_UnorderedMap.hpp.

KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::UnorderedMapInsertResult::existing ( ) const
inline

Was the key already present in the map.

Definition at line 75 of file Kokkos_UnorderedMap.hpp.

KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::UnorderedMapInsertResult::failed ( ) const
inline

Did the map fail to insert the key due to insufficient capacity.

Definition at line 79 of file Kokkos_UnorderedMap.hpp.

KOKKOS_FORCEINLINE_FUNCTION bool Kokkos::UnorderedMapInsertResult::freed_existing ( ) const
inline

Did the map lose a race condition to insert a dupulicate key/value pair where an index was claimed that needed to be released

Definition at line 84 of file Kokkos_UnorderedMap.hpp.

KOKKOS_FORCEINLINE_FUNCTION uint32_t Kokkos::UnorderedMapInsertResult::list_position ( ) const
inline

How many iterations through the insert loop did it take before the map returned

Definition at line 89 of file Kokkos_UnorderedMap.hpp.

KOKKOS_FORCEINLINE_FUNCTION uint32_t Kokkos::UnorderedMapInsertResult::index ( ) const
inline

Index where the key can be found as long as the insert did not fail.

Definition at line 93 of file Kokkos_UnorderedMap.hpp.


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