www.cemf.ir
sortedPairs< executionSpace, idType > Class Template Reference
+ Inheritance diagram for sortedPairs< executionSpace, idType >:
+ Collaboration diagram for sortedPairs< executionSpace, idType >:

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 = Pair< idType, idType >
 
using ContainerType = unorderedSet< PairType, ExecutionSpace >
 

Public Member Functions

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

Protected Types

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

Protected Attributes

uint32 size_ = 0
 size of pair list More...
 
ViewType1D< uint32, ExecutionSpaceflags_
 
ViewType1D< PairType, ExecutionSpacesortedPairs_
 
- 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

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

Definition at line 47 of file sortedPairs.hpp.

◆ ContainerType

Definition at line 49 of file sortedPairs.hpp.

◆ rpFillFlag

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

Definition at line 98 of file sortedPairs.hpp.

◆ rpFillPairs

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

Definition at line 104 of file sortedPairs.hpp.

Constructor & Destructor Documentation

◆ sortedPairs()

sortedPairs ( uint32  initialSize = 1)
inlineexplicit

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 ( uint32  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 ( uint32  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 ( uint32  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()

◆ loopCount()

uint32 loopCount ( ) const
inline

Definition at line 172 of file sortedPairs.hpp.

References sortedPairs< executionSpace, idType >::size_.

◆ getPairs()

◆ 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()

◆ operator()() [1/2]

◆ operator()() [2/2]

Member Data Documentation

◆ size_

◆ flags_

◆ sortedPairs_


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