It holds two vectors of indecis on Host and Device. More...
Classes | |
class | IndexAccessor |
Helper class for accessing index on host or device. More... | |
Public Types | |
using | DVType = DualViewType1D< IndexType > |
using | DeviceViewType = typename DVType::t_dev |
Device type on device. More... | |
using | HostViewType = typename DVType::t_host |
Host type on device. More... | |
using | HostType = typename HostViewType::device_type |
Host memory type. More... | |
using | DeviceType = typename DeviceViewType::device_type |
Device memory ype. More... | |
Public Member Functions | |
TypeInfoTemplateNV11 ("indexContainer", IndexType) | |
indexContainer () | |
Default. More... | |
template<typename T > | |
indexContainer (const Range< T > &rng) | |
Construct from a Range (half open) More... | |
indexContainer (IndexType begin, IndexType end) | |
Construct half open [begin,end) More... | |
indexContainer (IndexType *data, int32 numElems) | |
From data and number of elements in data. More... | |
indexContainer (std::vector< IndexType > &ind) | |
indexContainer (const DeviceViewType &ind) | |
indexContainer (const indexContainer &)=default | |
Copy. More... | |
indexContainer & | operator= (const indexContainer &)=default |
Copy assignment. More... | |
indexContainer (indexContainer &&)=default | |
Move. More... | |
indexContainer & | operator= (indexContainer &&)=default |
Mover assignement. More... | |
~indexContainer ()=default | |
Destructor. More... | |
INLINE_FUNCTION_HD auto | size () const |
Size. More... | |
INLINE_FUNCTION_HD bool | empty () const |
If the container empty. More... | |
INLINE_FUNCTION_HD IndexType | min () const |
Min value of indices. More... | |
INLINE_FUNCTION_HD IndexType | max () const |
Max value of indices. More... | |
const HostViewType & | hostView () const |
Return Host veiw. More... | |
const DeviceViewType & | deviceView () const |
Return Device view. More... | |
HostViewType & | hostView () |
Return Host veiw. More... | |
DeviceViewType & | deviceView () |
Return Device veiw. More... | |
auto | indicesHost () const |
Return index accessor that works on Host. More... | |
auto | indicesDevice () const |
Return index accessor that works on Device. More... | |
void | modifyOnHost () |
Mark host is modified. More... | |
void | modifyOnDevice () |
Mark device is modified. More... | |
void | syncViews () |
synchronize views More... | |
void | syncViews (uint32 newSize) |
Protected Attributes | |
IndexType | min_ = 0 |
min value in indices More... | |
IndexType | max_ = 0 |
max value in the indices More... | |
uint32 | size_ = 0 |
number/size of index vector More... | |
DVType | views_ |
views to hold indices on Host and Device More... | |
It holds two vectors of indecis on Host and Device.
Host vector should be used for threads running on Host and Device vector should be used for threads running on Device.
Definition at line 39 of file indexContainer.hpp.
using DVType = DualViewType1D<IndexType> |
Definition at line 43 of file indexContainer.hpp.
using DeviceViewType = typename DVType::t_dev |
Device type on device.
Definition at line 45 of file indexContainer.hpp.
using HostViewType = typename DVType::t_host |
Host type on device.
Definition at line 48 of file indexContainer.hpp.
using HostType = typename HostViewType::device_type |
Host memory type.
Definition at line 51 of file indexContainer.hpp.
using DeviceType = typename DeviceViewType::device_type |
Device memory ype.
Definition at line 54 of file indexContainer.hpp.
|
inline |
Default.
Definition at line 102 of file indexContainer.hpp.
|
inline |
Construct from a Range (half open)
Definition at line 106 of file indexContainer.hpp.
|
inline |
Construct half open [begin,end)
Definition at line 116 of file indexContainer.hpp.
References pFlow::copy(), pFlow::fillSequence(), indexContainer< IndexType >::min_, indexContainer< IndexType >::size_, and indexContainer< IndexType >::views_.
|
inline |
From data and number of elements in data.
data is a pointer in the Host memory
Definition at line 129 of file indexContainer.hpp.
References pFlow::copy(), pFlow::max(), indexContainer< IndexType >::max_, pFlow::min(), indexContainer< IndexType >::min_, and indexContainer< IndexType >::views_.
|
inline |
Definition at line 141 of file indexContainer.hpp.
|
inline |
Definition at line 146 of file indexContainer.hpp.
References pFlow::copy(), pFlow::max(), indexContainer< IndexType >::max_, pFlow::min(), indexContainer< IndexType >::min_, indexContainer< IndexType >::size_, and indexContainer< IndexType >::views_.
|
default |
Copy.
|
default |
Move.
|
default |
Destructor.
TypeInfoTemplateNV11 | ( | "indexContainer< IndexType >" | , |
IndexType | |||
) |
|
default |
Copy assignment.
|
default |
Mover assignement.
|
inline |
Size.
Definition at line 175 of file indexContainer.hpp.
References indexContainer< IndexType >::size_.
Referenced by particleIdHandler::hearChanges(), VectorSingle< uint32, HostSpace >::insertSetElement(), VectorDual< multiRotatingAxis >::insertSetElement(), VectorSingle< uint32, HostSpace >::reorderItems(), VectorDual< multiRotatingAxis >::sortItems(), and internalPoints::sortPoints().
|
inline |
If the container empty.
Definition at line 182 of file indexContainer.hpp.
References indexContainer< IndexType >::size_.
Referenced by VectorSingle< uint32, HostSpace >::insertSetElement().
|
inline |
Min value of indices.
Definition at line 189 of file indexContainer.hpp.
References indexContainer< IndexType >::min_.
Referenced by VectorDual< multiRotatingAxis >::insertSetElement().
|
inline |
Max value of indices.
Definition at line 196 of file indexContainer.hpp.
References indexContainer< IndexType >::max_.
Referenced by VectorSingle< uint32, HostSpace >::insertSetElement(), VectorDual< multiRotatingAxis >::insertSetElement(), and VectorSingle< uint32, HostSpace >::reorderItems().
|
inline |
Return Host veiw.
Definition at line 202 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
Referenced by VectorSingle< uint32, HostSpace >::insertSetElement(), VectorDual< multiRotatingAxis >::insertSetElement(), and VectorSingle< uint32, HostSpace >::reorderItems().
|
inline |
Return Device view.
Definition at line 208 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
Referenced by pFlow::getSortedIndices(), VectorSingle< uint32, HostSpace >::insertSetElement(), VectorDual< multiRotatingAxis >::insertSetElement(), VectorSingle< uint32, HostSpace >::reorderItems(), and VectorDual< multiRotatingAxis >::sortItems().
|
inline |
Return Host veiw.
Definition at line 214 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
|
inline |
Return Device veiw.
Definition at line 220 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
|
inline |
Return index accessor that works on Host.
Definition at line 226 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
|
inline |
Return index accessor that works on Device.
Definition at line 232 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
|
inline |
Mark host is modified.
Definition at line 238 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
|
inline |
Mark device is modified.
Definition at line 244 of file indexContainer.hpp.
References indexContainer< IndexType >::views_.
Referenced by pFlow::getSortedIndices().
|
inline |
synchronize views
Definition at line 250 of file indexContainer.hpp.
References pFlow::max(), indexContainer< IndexType >::max_, pFlow::min(), indexContainer< IndexType >::min_, indexContainer< IndexType >::size_, and indexContainer< IndexType >::views_.
Referenced by pFlow::getSortedIndices(), and indexContainer< IndexType >::syncViews().
|
inline |
Definition at line 273 of file indexContainer.hpp.
References indexContainer< IndexType >::size_, and indexContainer< IndexType >::syncViews().
|
protected |
min value in indices
Definition at line 84 of file indexContainer.hpp.
Referenced by indexContainer< IndexType >::indexContainer(), indexContainer< IndexType >::min(), and indexContainer< IndexType >::syncViews().
|
protected |
max value in the indices
Definition at line 87 of file indexContainer.hpp.
Referenced by indexContainer< IndexType >::indexContainer(), indexContainer< IndexType >::max(), and indexContainer< IndexType >::syncViews().
|
protected |
number/size of index vector
Definition at line 90 of file indexContainer.hpp.
Referenced by indexContainer< IndexType >::empty(), indexContainer< IndexType >::indexContainer(), indexContainer< IndexType >::size(), and indexContainer< IndexType >::syncViews().
|
protected |
views to hold indices on Host and Device
Definition at line 93 of file indexContainer.hpp.
Referenced by indexContainer< IndexType >::deviceView(), indexContainer< IndexType >::hostView(), indexContainer< IndexType >::indexContainer(), indexContainer< IndexType >::indicesDevice(), indexContainer< IndexType >::indicesHost(), indexContainer< IndexType >::modifyOnDevice(), indexContainer< IndexType >::modifyOnHost(), and indexContainer< IndexType >::syncViews().