Go to the documentation of this file.
22 #ifndef __mapperNBS_hpp__
23 #define __mapperNBS_hpp__
33 template<
typename executionSpace>
77 return head_(i,j,k); }
100 Kokkos::IndexType<int32>,
101 Kokkos::Schedule<Kokkos::Static>,
112 static_cast<int32>(-1)
122 static_cast<int32>(-1)
169 bool nextOwner =
true)
179 next_(
"mapperNBS::next_",1),
191 bool nextOwner =
true)
196 next_(
"mapperNBS::next_",1),
286 Kokkos::parallel_for(
291 int32 old = Kokkos::atomic_exchange(&
head(ind.
x(), ind.
y(), ind.
z()), i);
298 template<
typename IncludeFunction>
312 Kokkos::parallel_for(
313 "mapperNBS::build_Include",
319 auto old = Kokkos::atomic_exchange(&
head(ind.
x(), ind.
y(), ind.
z()), i);
341 Kokkos::parallel_for(
342 "mapperNBS::buildCheckInDomain",
348 int32 old = Kokkos::atomic_exchange(&head(ind.x(), ind.y(), ind.z()), i);
357 template<
typename IncludeFunction>
371 Kokkos::parallel_for(
372 "mapperNBS::buildCheckInDomain_Include",
378 auto old = Kokkos::atomic_exchange(&head(ind.x(), ind.y(), ind.z()), i);
389 #endif // __mapperNBS_hpp__
Kokkos::RangePolicy< Kokkos::IndexType< int32 >, Kokkos::Schedule< Kokkos::Static >, execution_space > rangePolicyType
mapperNBS(const box &domain, real cellSize, const ViewType1D< realx3, memory_space > &position, bool nextOwner=true)
ViewType3D< int32, memory_space > head_
INLINE_FUNCTION_HD int32 start(IndexType i, IndexType j, IndexType k) const
INLINE_FUNCTION_HD int32 nz() const
ViewType1D< int32, memory_space > next_
void fill(Vector< T, Allocator > &vec, const T &val)
void nullifyNext(range nextRng)
INLINE_FUNCTION_HD ~mapperNBS()=default
INLINE_FUNCTION_HD auto & head()
INLINE_FUNCTION_H void reallocNoInit(ViewType1D< Type, Properties... > &view, int32 len)
INLINE_FUNCTION_H void setNext(ViewType1D< int32, memory_space > &next)
INLINE_FUNCTION_HD int32 nx() const
INLINE_FUNCTION_HD mapperNBS()
ViewType1D< int32, memory_space > NextType
INLINE_FUNCTION_HD bool pointIndexInDomain(const realx3 p, CellType &index) const
INLINE_FUNCTION_HD T & y()
triple< indexType > CellType
const INLINE_FUNCTION_HD auto & next() const
mapperNBS(const box &domain, int32 nx, int32 ny, int32 nz, const ViewType1D< realx3, memory_space > &position, bool nextOwner=true)
INLINE_FUNCTION_H void buildCheckInDomain(range activeRange)
bool particlesCapcityChanged(int32 newCap)
const auto & domain() const
INLINE_FUNCTION_HD int32 getNext(int32 n) const
void checkAllocateNext(int newCap)
INLINE_FUNCTION_HD auto & pointPosition()
#define INLINE_FUNCTION_H
INLINE_FUNCTION_HD auto & next()
INLINE_FUNCTION_HD Cells cellsSize() const
const INLINE_FUNCTION_HD auto & head() const
void nullify(range nextRng)
INLINE_FUNCTION_HD T & z()
ViewType3D< int32, memory_space > HeadType
DefaultHostExecutionSpace execution_space
INLINE_FUNCTION_HD mapperNBS & operator=(const mapperNBS &)=default
INLINE_FUNCTION_HD int32 ny() const
Kokkos::View< T *, properties... > ViewType1D
INLINE_FUNCTION_HD realx3 cellSize() const
cellIterator(ViewType3D< int32, memory_space > head, ViewType1D< int32, memory_space > next)
INLINE_FUNCTION_HD T & x()
INLINE_FUNCTION_H void nullifyHead()
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD CellType pointIndex(const realx3 &p) const
typename execution_space::memory_space memory_space
INLINE_FUNCTION_H void build(range activeRange)
INLINE_FUNCTION_H void build(range activeRange, IncludeFunction incld)
cellIterator getCellIterator() const
Kokkos::View< T ***, properties... > ViewType3D
INLINE_FUNCTION_HD auto capacity() const
INLINE_FUNCTION_H void buildCheckInDomain(range activeRange, IncludeFunction incld)
ViewType1D< realx3, memory_space > pointPosition_