IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::NDIndex< Dim > Class Template Reference

#include <NDIndex.h>

Collaboration diagram for ippl::NDIndex< Dim >:

Public Types

using iterator = Index*
using const_iterator = const Index*

Public Member Functions

KOKKOS_FUNCTION NDIndex ()
template<class... Args>
KOKKOS_FUNCTION NDIndex (const Args &... args)
KOKKOS_FUNCTION NDIndex (const Vector< unsigned, Dim > &sizes)
KOKKOS_INLINE_FUNCTION const ippl::Indexoperator[] (unsigned d) const noexcept
KOKKOS_INLINE_FUNCTION Indexoperator[] (unsigned d) noexcept
KOKKOS_INLINE_FUNCTION unsigned size () const noexcept
KOKKOS_INLINE_FUNCTION bool empty () const noexcept
KOKKOS_INLINE_FUNCTION NDIndex< Dimintersect (const NDIndex< Dim > &) const
KOKKOS_INLINE_FUNCTION NDIndex< Dimgrow (int ncells) const
KOKKOS_INLINE_FUNCTION NDIndex< Dimgrow (int ncells, unsigned int dim) const
KOKKOS_INLINE_FUNCTION bool touches (const NDIndex< Dim > &) const
KOKKOS_INLINE_FUNCTION bool contains (const NDIndex< Dim > &a) const
KOKKOS_INLINE_FUNCTION bool split (NDIndex< Dim > &l, NDIndex< Dim > &r, unsigned d, int i) const
KOKKOS_INLINE_FUNCTION bool split (NDIndex< Dim > &l, NDIndex< Dim > &r, unsigned d, double a) const
KOKKOS_INLINE_FUNCTION bool split (NDIndex< Dim > &l, NDIndex< Dim > &r, unsigned d) const
KOKKOS_INLINE_FUNCTION bool split (NDIndex< Dim > &l, NDIndex< Dim > &r) const
KOKKOS_INLINE_FUNCTION Vector< size_t, Dimlength () const
KOKKOS_INLINE_FUNCTION Vector< int, Dimfirst () const
KOKKOS_INLINE_FUNCTION Vector< int, Dimlast () const
KOKKOS_INLINE_FUNCTION constexpr iterator begin ()
KOKKOS_INLINE_FUNCTION constexpr iterator end ()
KOKKOS_INLINE_FUNCTION constexpr const_iterator begin () const
KOKKOS_INLINE_FUNCTION constexpr const_iterator end () const

Private Member Functions

KOKKOS_FUNCTION NDIndex (std::initializer_list< Index > indices)

Private Attributes

Index indices_m [Dim]
 Array of indices.

Detailed Description

template<unsigned Dim>
class ippl::NDIndex< Dim >

Definition at line 21 of file NDIndex.h.

Member Typedef Documentation

◆ const_iterator

template<unsigned Dim>
using ippl::NDIndex< Dim >::const_iterator = const Index*

Definition at line 82 of file NDIndex.h.

◆ iterator

template<unsigned Dim>
using ippl::NDIndex< Dim >::iterator = Index*

Definition at line 81 of file NDIndex.h.

Constructor & Destructor Documentation

◆ NDIndex() [1/4]

template<unsigned Dim>
KOKKOS_FUNCTION ippl::NDIndex< Dim >::NDIndex ( )
inline

Definition at line 24 of file NDIndex.h.

Referenced by contains(), grow(), grow(), intersect(), NDIndex(), split(), split(), split(), split(), and touches().

Here is the caller graph for this function:

◆ NDIndex() [2/4]

template<unsigned Dim>
template<class... Args>
KOKKOS_FUNCTION ippl::NDIndex< Dim >::NDIndex ( const Args &... args)

Definition at line 11 of file NDIndex.hpp.

References NDIndex().

Here is the call graph for this function:

◆ NDIndex() [3/4]

template<unsigned Dim>
KOKKOS_FUNCTION ippl::NDIndex< Dim >::NDIndex ( const Vector< unsigned, Dim > & sizes)

Definition at line 26 of file NDIndex.hpp.

References Dim, and indices_m.

◆ NDIndex() [4/4]

template<unsigned Dim>
KOKKOS_FUNCTION ippl::NDIndex< Dim >::NDIndex ( std::initializer_list< Index > indices)
private

Definition at line 17 of file NDIndex.hpp.

References indices_m.

Member Function Documentation

◆ begin() [1/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr NDIndex< Dim >::iterator ippl::NDIndex< Dim >::begin ( )
constexpr

Definition at line 186 of file NDIndex.hpp.

References indices_m.

Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::findCutAxis().

Here is the caller graph for this function:

◆ begin() [2/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr NDIndex< Dim >::const_iterator ippl::NDIndex< Dim >::begin ( ) const
constexpr

Definition at line 196 of file NDIndex.hpp.

References indices_m.

◆ contains()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::contains ( const NDIndex< Dim > & a) const

Definition at line 104 of file NDIndex.hpp.

References Dim, indices_m, and NDIndex().

Referenced by ippl::SubFieldLayout< Dim >::initialize().

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

◆ empty()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::empty ( ) const
noexcept
Returns
true if empty.

Definition at line 52 of file NDIndex.hpp.

References Dim, and indices_m.

◆ end() [1/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr NDIndex< Dim >::iterator ippl::NDIndex< Dim >::end ( )
constexpr

Definition at line 191 of file NDIndex.hpp.

References Dim, and indices_m.

Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::findCutAxis().

Here is the caller graph for this function:

◆ end() [2/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr NDIndex< Dim >::const_iterator ippl::NDIndex< Dim >::end ( ) const
constexpr

Definition at line 202 of file NDIndex.hpp.

References Dim, and indices_m.

◆ first()

◆ grow() [1/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION NDIndex< Dim > ippl::NDIndex< Dim >::grow ( int ncells) const

Intersect with another NDIndex.

Definition at line 79 of file NDIndex.hpp.

References Dim, indices_m, and NDIndex().

Referenced by ippl::PeriodicFace< Field >::apply(), and ippl::FieldLayout< Dim >::getBounds().

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

◆ grow() [2/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION NDIndex< Dim > ippl::NDIndex< Dim >::grow ( int ncells,
unsigned int dim ) const

Definition at line 88 of file NDIndex.hpp.

References indices_m, and NDIndex().

Here is the call graph for this function:

◆ intersect()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION NDIndex< Dim > ippl::NDIndex< Dim >::intersect ( const NDIndex< Dim > & ndi) const

Intersect with another NDIndex.

Definition at line 70 of file NDIndex.hpp.

References Dim, indices_m, and NDIndex().

Referenced by ippl::PeriodicFace< Field >::apply(), ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::communicateVico(), and ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::communicateVico().

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

◆ last()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< int, Dim > ippl::NDIndex< Dim >::last ( ) const

◆ length()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< size_t, Dim > ippl::NDIndex< Dim >::length ( ) const

Definition at line 162 of file NDIndex.hpp.

References indices_m.

Referenced by ippl::FieldLayout< Dim >::calcWidths(), ippl::FFTBase< Field, FFT, Backend, BufferType >::domainToBounds(), ippl::FieldLayout< Dim >::initialize(), pack(), split(), and unpack_impl().

Here is the caller graph for this function:

◆ operator[]() [1/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION const Index & ippl::NDIndex< Dim >::operator[] ( unsigned d) const
noexcept
Returns
a reference to any of the Indexes.

Definition at line 33 of file NDIndex.hpp.

References indices_m.

◆ operator[]() [2/2]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION Index & ippl::NDIndex< Dim >::operator[] ( unsigned d)
noexcept

Definition at line 38 of file NDIndex.hpp.

References indices_m.

◆ size()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION unsigned ippl::NDIndex< Dim >::size ( ) const
noexcept

◆ split() [1/4]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::split ( NDIndex< Dim > & l,
NDIndex< Dim > & r ) const

Definition at line 149 of file NDIndex.hpp.

References Dim, indices_m, length(), NDIndex(), and split().

Here is the call graph for this function:

◆ split() [2/4]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::split ( NDIndex< Dim > & l,
NDIndex< Dim > & r,
unsigned d ) const

Definition at line 137 of file NDIndex.hpp.

References indices_m, and NDIndex().

Here is the call graph for this function:

◆ split() [3/4]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::split ( NDIndex< Dim > & l,
NDIndex< Dim > & r,
unsigned d,
double a ) const

Definition at line 125 of file NDIndex.hpp.

References indices_m, and NDIndex().

Here is the call graph for this function:

◆ split() [4/4]

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::split ( NDIndex< Dim > & l,
NDIndex< Dim > & r,
unsigned d,
int i ) const

Definition at line 113 of file NDIndex.hpp.

References indices_m, and NDIndex().

Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::cutDomain(), and split().

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

◆ touches()

template<unsigned Dim>
KOKKOS_INLINE_FUNCTION bool ippl::NDIndex< Dim >::touches ( const NDIndex< Dim > & a) const

Definition at line 95 of file NDIndex.hpp.

References Dim, indices_m, and NDIndex().

Referenced by ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::communicateVico(), and ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::communicateVico().

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

Member Data Documentation

◆ indices_m

template<unsigned Dim>
Index ippl::NDIndex< Dim >::indices_m[Dim]
private

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