|
constexpr | IntVectND () noexcept |
| Construct an IntVectND whose components are all zero. More...
|
|
template<class... Args, std::enable_if_t<(sizeof...(Args)+2==dim) &&IsConvertible_v< int, Args... >, int > = 0> |
constexpr AMREX_GPU_HOST_DEVICE | IntVectND (int i, int j, Args...ks) noexcept |
| Construct an IntVectND given the specific values for its coordinates. The inputs for this constructor are N integers, where N is equal to the number of dimensions of the IntVectND. More...
|
|
constexpr AMREX_GPU_HOST_DEVICE | IntVectND (int s) noexcept |
| Construct an IntVectND whose components are all the same. More...
|
|
AMREX_GPU_HOST_DEVICE | IntVectND (const int *a) noexcept |
| Construct an IntVectND setting the coordinates to the corresponding values in the integer array a. More...
|
|
| IntVectND (const Vector< int > &a) noexcept |
| Construct an IntVectND from an Vector<int>. It is an error if the Vector<int> doesn't have the same dimension as this IntVectND. More...
|
|
| IntVectND (const Array< int, dim > &a) noexcept |
| Construct an IntVectND from an Array<int,dim>. More...
|
|
template<int N = dim, std::enable_if_t<(1<=N &&N<=3), int > = 0> |
constexpr | IntVectND (Dim3 const &a) noexcept |
|
template<int N = dim, std::enable_if_t<(1<=N &&N<=3), int > = 0> |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 | dim3 () const noexcept |
|
template<int N = dim, std::enable_if_t<(1<=N &&N<=3), int > = 0> |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 | dim3 ([[maybe_unused]] int fill_extra) const noexcept |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | sum () const noexcept |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | max () const noexcept |
| maximum (no absolute values) value More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | min () const noexcept |
| minimum (no absolute values) value More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | maxDir (bool a_doAbsValue) const noexcept |
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE int & | operator[] (int i) noexcept |
| Returns a reference to the i'th coordinate of the IntVectND. More...
|
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const int & | operator[] (int i) const noexcept |
| Returns the i'th coordinate of the IntVectND. More...
|
|
template<std::size_t i> |
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE int & | get () noexcept |
| Returns a reference to the i'th coordinate of the IntVectND. Used by structured bindings. More...
|
|
template<std::size_t i> |
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const int & | get () const noexcept |
| Returns a reference to the i'th coordinate of the IntVectND. Used by structured bindings. More...
|
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE int * | begin () noexcept |
| Returns a pointer to the first element of the IntVectND. More...
|
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const int * | begin () const noexcept |
| Returns a pointer to the first element of the IntVectND. More...
|
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE int * | end () noexcept |
| Returns a pointer to the (last+1) element of the IntVectND. More...
|
|
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const int * | end () const noexcept |
| Returns a pointer to the (last+1) element of the IntVectND. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND & | setVal (int i, int val) noexcept |
| Set i'th coordinate of IntVectND to val. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * | getVect () const &noexcept |
| Returns a const pointer to an array of coordinates of the IntVectND. Useful for arguments to FORTRAN calls. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int * | getVect () &noexcept |
|
AMREX_GPU_HOST_DEVICE int * | getVect () &&=delete |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator== (int val) const noexcept |
| Returns true if all components are equal to the argument val. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator!= (int val) const noexcept |
| Returns true if any component is not equal to the argument val. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator== (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is equivalent to rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator!= (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is different from rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator< (const IntVectND< dim > &rhs) const noexcept |
| Return true if this is lexicographically less than rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator<= (const IntVectND< dim > &rhs) const noexcept |
| Return true if this is lexicographically less than or equal to rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator> (const IntVectND< dim > &rhs) const noexcept |
| Return true if this is lexicographically greater than rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | operator>= (const IntVectND< dim > &rhs) const noexcept |
| Return true if this is lexicographically greater than or equal to rhs. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allLT (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is less than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allLT (int rhs) const noexcept |
| Returns true if this is less than argument for all components. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allLE (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is less than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allLE (int rhs) const noexcept |
| Returns true if this is less than or equal to argument for all components. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allGT (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is greater than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allGT (int rhs) const noexcept |
| Returns true if this is greater than argument for all components. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allGE (const IntVectND< dim > &rhs) const noexcept |
| Returns true if this is greater than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | allGE (int rhs) const noexcept |
| Returns true if this is greater than or equal to argument for all components. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator+ () const noexcept |
| Unary plus – for completeness. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator- () const noexcept |
| Unary Minus – negates all components. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator+= (int s) noexcept |
| Modifies IntVectND by addition of a scalar to each component. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator+= (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by component-wise addition with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator*= (int s) noexcept |
| Modifies IntVectND by multiplication of a scalar to each component. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator*= (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by component-wise multiplication with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator/= (int s) noexcept |
| Modifies IntVectND by division by a scalar to each component. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator/= (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by component-wise division with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator-= (int s) noexcept |
| Modifies IntVectND by subtraction of a scalar to each component. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | operator-= (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by component-wise subtraction with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator+ (const IntVectND< dim > &p) const noexcept |
| Returns component-wise sum of IntVectND<and argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator+ (int s) const noexcept |
| Return an IntVectND that is this IntVectND + s. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator- (const IntVectND< dim > &p) const noexcept |
| Returns component-wise difference of IntVectND and argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator- (int s) const noexcept |
| Return an IntVectND that is this IntVectND - s. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator* (const IntVectND< dim > &p) const noexcept |
| Returns component-wise product of IntVectND and argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator* (int s) const noexcept |
| Returns component-wise product of IntVectND and s. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator/ (const IntVectND< dim > &p) const noexcept |
| Returns component-wise division of IntVectND by argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > | operator/ (int s) const noexcept |
| Returns component-wise division of IntVectND by s. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | min (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by taking component-wise min with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | max (const IntVectND< dim > &p) noexcept |
| Modifies IntVectND by taking component-wise max with argument. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | scale (int s) noexcept |
| Modify IntVectND by multiplying each coordinate by s. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | reflect (int ref_ix, int idir) noexcept |
| Modify IntVectND by reflecting it in the plane defined by the index ref_ix and with normal in the direction of idir. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | shift (int coord, int s) noexcept |
| Modify IntVectND by adding s to given coordinate. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | shift (const IntVectND< dim > &iv) noexcept |
| Equivalent to shift(0,iv[0]).shift(1,iv[1]) ... More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | diagShift (int s) noexcept |
| Modify IntVectND by adding s to each coordinate. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | coarsen (const IntVectND< dim > &p) noexcept |
| Modify IntVectND<dim> by component-wise integer projection. More...
|
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > & | coarsen (int p) noexcept |
| Modify IntVectND<dim> by component-wise integer projection. More...
|
|
template<int new_dim> |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< new_dim > | shrink () const noexcept |
| Returns a new IntVectND of size new_dim and assigns the first new_dim values of this IntVectND to it. More...
|
|
template<int new_dim> |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< new_dim > | expand (int fill_extra=0) const noexcept |
| Returns a new IntVectND of size new_dim and assigns all values of this IntVectND to it and fill_extra to the remaining elements. More...
|
|
template<int new_dim> |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< new_dim > | resize (int fill_extra=0) const noexcept |
| Returns a new IntVectND of size new_dim by either shrinking or expanding this IntVectND. More...
|
|
template<int dim>
class amrex::IntVectND< dim >
An Integer Vector in dim-Dimensional Space
The class IntVectND is an implementation of an integer vector in a dim-dimensional space. It represents a point in a discrete space. IntVectND values are accessed using the operator[] function, as for a normal C++ array. In addition, the basic arithmetic operators have been overloaded to implement scaling and translation operations.