# PhasicFlow: sortedPairs< executionSpace, idType > Class Template Reference

sortedPairs< executionSpace, idType > Class Template Reference
Inheritance diagram for sortedPairs< executionSpace, idType >:
[legend]
Collaboration diagram for sortedPairs< executionSpace, idType >:
[legend]

## Classes

struct | pairAccessor
class | TagFillFlag
class | TagFillPairs

## Public Types

using | UnsortedPairs = unsortedPairs< executionSpace, idType >
using | IdType = typename UnsortedPairs::IdType
using | ExecutionSpace = typename UnsortedPairs::ExecutionSpace
using | memory_space = typename ExecutionSpace::memory_space
using | PairType = typename UnsortedPairs::PairType
using | ContainerType = typename UnsortedPairs::ContainerType
Public Types inherited from unsortedPairs< executionSpace, idType >
using | UnsortedPairs = unsortedPairs< executionSpace, idType >
using | IdType = idType
using | ExecutionSpace = executionSpace
using | memory_space = typename ExecutionSpace::memory_space
using | PairType = kPair< idType, idType >
using | ContainerType = unorderedSet< PairType, ExecutionSpace >

## Public Member Functions

| TypeInfoNV ("sortedPairs")
| sortedPairs (int32 initialSize=1)
bool | beforeBroadSearch ()
bool | afterBroadSearch ()
INLINE_FUNCTION_HD PairType | getPair (int32 idx) const
INLINE_FUNCTION_HD bool | getPair (int32 idx, PairType &p) const
INLINE_FUNCTION_HD bool | isValid (int32 idx) const
INLINE_FUNCTION_H int32 | size () const
int32 | loopCount () const
pairAccessor | getPairs () const
INLINE_FUNCTION_H void | clear ()
void | prepareSorted ()
INLINE_FUNCTION_HD void | operator() (TagFillFlag, int32 i) const
INLINE_FUNCTION_HD void | operator() (TagFillPairs, int32 i) const
Public Member Functions inherited from unsortedPairs< executionSpace, idType >
| TypeInfoNV ("unsorderedPairs")
| unsortedPairs (int32 capacity=1)
bool | beforeBroadSearch ()
bool | afterBroadSearch ()
INLINE_FUNCTION_HD int32 | insert (idType i, idType j) const
INLINE_FUNCTION_HD int32 | insert (const PairType &p) const
INLINE_FUNCTION_HD PairType | getPair (int32 idx) const
INLINE_FUNCTION_HD bool | getPair (int32 idx, PairType &p) const
INLINE_FUNCTION_HD int32 | find (const PairType &p) const
INLINE_FUNCTION_HD bool | isValid (int32 idx) const
INLINE_FUNCTION_HD int32 | capacity () const
int32 | loopCount () const
INLINE_FUNCTION_H int32 | size () const
pairAccessor | getPairs () const
INLINE_FUNCTION_H void | increaseCapacityBy (int32 len)
| increase the capacity of the container by at-least len the content will be erased. More...
INLINE_FUNCTION_H void | clear ()
const ContainerType & | container () const

## Protected Types

using | rpFillFlag = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 >, TagFillFlag >
using | rpFillPairs = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 >, TagFillPairs >

## Protected Attributes

int32 | size_ = 0
| size of pair list More...
ViewType1D< int32, ExecutionSpace > | flags_
ViewType1D< PairType, ExecutionSpace > | sortedPairs_
Protected Attributes inherited from unsortedPairs< executionSpace, idType >
ContainerType | container_

## Detailed Description

### template<typename executionSpace, typename idType>
class pFlow::sortedPairs< executionSpace, idType >

Definition at line 33 of file sortedPairs.hpp.

## Member Typedef Documentation

## UnsortedPairs

using UnsortedPairs = unsortedPairs<executionSpace,idType>

Definition at line 39 of file sortedPairs.hpp.

## IdType

using IdType = typename UnsortedPairs::IdType

Definition at line 41 of file sortedPairs.hpp.

## ExecutionSpace

using ExecutionSpace = typename UnsortedPairs::ExecutionSpace

Definition at line 43 of file sortedPairs.hpp.

## memory_space

using memory_space = typename ExecutionSpace::memory_space

Definition at line 45 of file sortedPairs.hpp.

## PairType

using PairType = typename UnsortedPairs::PairType

Definition at line 47 of file sortedPairs.hpp.

## ContainerType

using ContainerType = typename UnsortedPairs::ContainerType

Definition at line 49 of file sortedPairs.hpp.

## rpFillFlag

using rpFillFlag = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule<Kokkos::Static>, Kokkos::IndexType<int32>, TagFillFlag >

protected

Definition at line 98 of file sortedPairs.hpp.

## rpFillPairs

using rpFillPairs = Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule<Kokkos::Static>, Kokkos::IndexType<int32>, TagFillPairs>

protected

Definition at line 104 of file sortedPairs.hpp.

## Constructor & Destructor Documentation

## sortedPairs()

sortedPairs | ( | int32 | initialSize = `1` | ) |

inline

Definition at line 113 of file sortedPairs.hpp.

## Member Function Documentation

## TypeInfoNV()

TypeInfoNV | ( | "sortedPairs< executionSpace, idType >" |  | ) |

## beforeBroadSearch()

bool beforeBroadSearch | ( |  | ) |

inline

Definition at line 121 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::clear().

Referenced by sortedContactList< valueType, executionSpace, idType >::beforeBroadSearch().

Here is the call graph for this function:
Here is the caller graph for this function:

## afterBroadSearch()

bool afterBroadSearch | ( |  | ) |

inline

Definition at line 127 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::prepareSorted().

Referenced by sortedContactList< valueType, executionSpace, idType >::afterBroadSearch().

Here is the call graph for this function:
Here is the caller graph for this function:

## getPair() [1/2]

INLINE_FUNCTION_HD PairType getPair | ( | int32 | idx | ) | const

inline

Definition at line 137 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::sortedPairs_.

Referenced by sortedPairs< executionSpace, idType >::getPair().

Here is the caller graph for this function:

## getPair() [2/2]

INLINE_FUNCTION_HD bool getPair | ( | int32 | idx,
|  | PairType & | p
| ) |  | const

inline

Definition at line 145 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::getPair(), and sortedPairs< executionSpace, idType >::isValid().

Here is the call graph for this function:

## isValid()

INLINE_FUNCTION_HD bool isValid | ( | int32 | idx | ) | const

inline

Definition at line 159 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::size_.

Referenced by sortedPairs< executionSpace, idType >::getPair().

Here is the caller graph for this function:

## size()

INLINE_FUNCTION_H int32 size | ( |  | ) | const

inline

Definition at line 167 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::size_.

Referenced by sortedContactList< valueType, executionSpace, idType >::adjustCapacity(), sortedContactList< valueType, executionSpace, idType >::afterBroadSearch(), and sortedContactList< valueType, executionSpace, idType >::beforeBroadSearch().

Here is the caller graph for this function:

## loopCount()

int32 loopCount | ( |  | ) | const

inline

Definition at line 172 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::size_.

## getPairs()

pairAccessor getPairs | ( |  | ) | const

inline

Definition at line 177 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::size_, and sortedPairs< executionSpace, idType >::sortedPairs_.

## clear()

INLINE_FUNCTION_H void clear | ( |  | ) |

inline

Definition at line 183 of file sortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::clear(), and sortedPairs< executionSpace, idType >::size_.

Referenced by sortedPairs< executionSpace, idType >::beforeBroadSearch().

Here is the call graph for this function:
Here is the caller graph for this function:

## prepareSorted()

void prepareSorted | ( |  | ) |

inline

Definition at line 189 of file sortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::capacity(), pFlow::exclusiveScan(), sortedPairs< executionSpace, idType >::flags_, pFlow::getNth(), pFlow::reallocNoInit(), sortedPairs< executionSpace, idType >::size_, pFlow::sort(), and sortedPairs< executionSpace, idType >::sortedPairs_.

Referenced by sortedPairs< executionSpace, idType >::afterBroadSearch().

Here is the call graph for this function:
Here is the caller graph for this function:

## operator()() [1/2]

INLINE_FUNCTION_HD void operator() | ( | TagFillFlag | ,
|  | int32 | i
| ) |  | const

inline

Definition at line 238 of file sortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_, and sortedPairs< executionSpace, idType >::flags_.

## operator()() [2/2]

INLINE_FUNCTION_HD void operator() | ( | TagFillPairs | ,
|  | int32 | i
| ) |  | const

inline

Definition at line 247 of file sortedPairs.hpp.

References unsortedPairs< executionSpace, idType >::container_, sortedPairs< executionSpace, idType >::flags_, and sortedPairs< executionSpace, idType >::sortedPairs_.

## Member Data Documentation

## size_

int32 size_ = 0

protected

size of pair list

Definition at line 88 of file sortedPairs.hpp.

Referenced by sortedPairs< executionSpace, idType >::clear(), sortedPairs< executionSpace, idType >::getPairs(), sortedPairs< executionSpace, idType >::isValid(), sortedPairs< executionSpace, idType >::loopCount(), sortedPairs< executionSpace, idType >::prepareSorted(), and sortedPairs< executionSpace, idType >::size().

## flags_

ViewType1D<int32,ExecutionSpace> flags_

protected

Definition at line 90 of file sortedPairs.hpp.

Referenced by sortedPairs< executionSpace, idType >::operator()(), and sortedPairs< executionSpace, idType >::prepareSorted().

## sortedPairs_

ViewType1D<PairType,ExecutionSpace> sortedPairs_

protected

Definition at line 92 of file sortedPairs.hpp.

Referenced by sortedContactList< valueType, executionSpace, idType >::beforeBroadSearch(), sortedPairs< executionSpace, idType >::getPair(), sortedPairs< executionSpace, idType >::getPairs(), sortedContactList< valueType, executionSpace, idType >::operator()(), sortedPairs< executionSpace, idType >::operator()(), and sortedPairs< executionSpace, idType >::prepareSorted().

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

- src/Interaction/contactLists/sortedPairs.hpp