Go to the documentation of this file.
21 #ifndef __unsortedPairs_hpp__
22 #define __unsortedPairs_hpp__
31 template<
typename executionSpace,
typename idType>
108 return static_cast<uint32>(-1);
110 return insertResult.index();
117 if(
auto insertResult =
container_.insert(p); insertResult.failed())
118 return static_cast<uint32>(-1);
120 return insertResult.index();
154 idx != Kokkos::UnorderedMapInvalidIndex )
157 return static_cast<uint32>(-1);
197 container_.rehash(newCap);
216 #endif //__unsortedPairs_hpp__
INLINE_FUNCTION_HD uint32 insert(const PairType &p) const
INLINE_FUNCTION_HD bool getPair(uint32 idx, PairType &pair) const
INLINE_FUNCTION_HD uint32 capacity() const
typename ExecutionSpace::memory_space memory_space
INLINE_FUNCTION_HD bool isValid(uint32 idx) const
Pair< idType, idType > PairType
Kokkos::pair< T1, T2 > Pair
Pair of two variables.
INLINE_FUNCTION_HD PairType getPair(uint32 idx) const
INLINE_FUNCTION_HD uint32 insert(idType i, idType j) const
unsortedPairs(uint32 capacity=1)
INLINE_FUNCTION_HD uint32 size() const
TypeInfoNV("unsorderedPairs")
Kokkos::UnorderedMap< Key, void, properties... > unorderedSet
unordered set
INLINE_FUNCTION_H void increaseCapacityBy(uint32 len)
increase the capacity of the container by at-least len the content will be erased.
INLINE_FUNCTION_HD bool isValid(uint32 idx) const
#define INLINE_FUNCTION_H
INLINE_FUNCTION_H void clear()
pairAccessor getPairs() const
INLINE_FUNCTION_HD bool getPair(uint32 idx, PairType &p) const
INLINE_FUNCTION_HD PairType getPair(uint32 idx) const
unorderedSet< PairType, ExecutionSpace > ContainerType
INLINE_FUNCTION_H uint32 size() const
INLINE_FUNCTION_HD uint32 loopCount() const
INLINE_FUNCTION_HD uint32 find(const PairType &p) const
const ContainerType & container() const
#define INLINE_FUNCTION_HD
executionSpace ExecutionSpace
typename UnsortedPairs::PairType PairType