IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
NDRegion.h
Go to the documentation of this file.
1//
2// Class NDRegion
3// NDRegion is a simple container of N PRegion objects. It is templated
4// on the type of data (T) and the number of PRegions (Dim).
5//
6#ifndef IPPL_NDREGION_H
7#define IPPL_NDREGION_H
8
9#include <initializer_list>
10
11#include "Region/PRegion.h"
12
13namespace ippl {
14 template <typename T, unsigned Dim>
20 class NDRegion {
21 public:
25 KOKKOS_FUNCTION
27
28 KOKKOS_FUNCTION
30
38 template <class... Args>
39 KOKKOS_FUNCTION NDRegion(const Args&... args);
40
41 KOKKOS_INLINE_FUNCTION NDRegion(const NDRegion<T, Dim>& nr);
42
43 KOKKOS_INLINE_FUNCTION NDRegion<T, Dim>& operator=(const NDRegion<T, Dim>& nr);
44
45 KOKKOS_INLINE_FUNCTION const PRegion<T>& operator[](unsigned d) const;
46
47 KOKKOS_INLINE_FUNCTION PRegion<T>& operator[](unsigned d);
48
49 KOKKOS_INLINE_FUNCTION NDRegion<T, Dim>& operator+=(const T t);
50
51 KOKKOS_INLINE_FUNCTION NDRegion<T, Dim>& operator-=(const T t);
52
53 KOKKOS_INLINE_FUNCTION NDRegion<T, Dim>& operator*=(const T t);
54
55 KOKKOS_INLINE_FUNCTION NDRegion<T, Dim>& operator/=(const T t);
56
57 KOKKOS_INLINE_FUNCTION bool empty() const;
58
59 private:
60 KOKKOS_FUNCTION
61 NDRegion(std::initializer_list<PRegion<T>> regions);
62
65 };
66} // namespace ippl
67
68#include "Region/NDRegion.hpp"
69
70#endif
constexpr unsigned Dim
Definition Archive.h:20
PRegion< T > regions_m[Dim]
Definition NDRegion.h:64
KOKKOS_INLINE_FUNCTION NDRegion< T, Dim > & operator*=(const T t)
Definition NDRegion.hpp:68
KOKKOS_FUNCTION NDRegion(std::initializer_list< PRegion< T > > regions)
Definition NDRegion.hpp:17
KOKKOS_INLINE_FUNCTION NDRegion< T, Dim > & operator-=(const T t)
Definition NDRegion.hpp:60
KOKKOS_INLINE_FUNCTION bool empty() const
Definition NDRegion.hpp:86
KOKKOS_FUNCTION NDRegion(const Args &... args)
Definition NDRegion.hpp:11
KOKKOS_FUNCTION ~NDRegion()
Definition NDRegion.h:29
KOKKOS_INLINE_FUNCTION NDRegion< T, Dim > & operator=(const NDRegion< T, Dim > &nr)
Definition NDRegion.hpp:33
KOKKOS_FUNCTION NDRegion()
Definition NDRegion.h:26
KOKKOS_INLINE_FUNCTION NDRegion< T, Dim > & operator+=(const T t)
Definition NDRegion.hpp:52
KOKKOS_INLINE_FUNCTION NDRegion< T, Dim > & operator/=(const T t)
Definition NDRegion.hpp:76
KOKKOS_INLINE_FUNCTION NDRegion(const NDRegion< T, Dim > &nr)
Definition NDRegion.hpp:26
KOKKOS_INLINE_FUNCTION PRegion< T > & operator[](unsigned d)
Definition NDRegion.hpp:47
KOKKOS_INLINE_FUNCTION const PRegion< T > & operator[](unsigned d) const
Definition NDRegion.hpp:42