Intrepid2
|
essentially, a read-only variant of ViewIterator, for a general functor (extent_int() and rank() support required) More...
#include <Intrepid2_FunctorIterator.hpp>
Public Types | |
using | return_type = typename std::conditional< functor_returns_ref< FunctorType, ScalarType, rank >::value, const ScalarType &, const ScalarType >::type |
template<bool B, class T = return_type> | |
using | enable_if_t = typename std::enable_if< B, T >::type |
Public Member Functions | |
KOKKOS_INLINE_FUNCTION | FunctorIterator (const FunctorType &functor) |
template<int M = rank> | |
enable_if_t< M==0 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==1 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==2 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==3 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==4 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==5 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==6 > KOKKOS_INLINE_FUNCTION | get () const |
template<int M = rank> | |
enable_if_t< M==7 > KOKKOS_INLINE_FUNCTION | get () const |
KOKKOS_INLINE_FUNCTION int | nextIncrementRank () |
KOKKOS_INLINE_FUNCTION int | increment () |
KOKKOS_INLINE_FUNCTION bool | decrement () |
KOKKOS_INLINE_FUNCTION int | getEnumerationIndex () |
KOKKOS_INLINE_FUNCTION void | setEnumerationIndex (const int &enumerationIndex) |
KOKKOS_INLINE_FUNCTION int | getIndex (int dimension) |
KOKKOS_INLINE_FUNCTION int | getExtent (int dimension) |
KOKKOS_INLINE_FUNCTION void | reset (unsigned from_rank_number=0) |
KOKKOS_INLINE_FUNCTION void | setLocation (const Kokkos::Array< int, 7 > &location) |
KOKKOS_INLINE_FUNCTION void | setLocationInDim (const int &dim, const int &i) |
KOKKOS_INLINE_FUNCTION Kokkos::Array< int, 7 > & | getLocation () |
Private Attributes | |
const FunctorType & | functor_ |
Kokkos::Array< int, 7 > | dims_ |
Kokkos::Array< int, 7 > | index_ |
essentially, a read-only variant of ViewIterator, for a general functor (extent_int() and rank() support required)
Definition at line 107 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Constructor. A reference to the functor is stored. This means that FunctorIterators should be constructed where they will be used — on device, or on host, e.g., but not copied from host to device.
[in] | functor | - the functor to iterate over |
Definition at line 116 of file Intrepid2_FunctorIterator.hpp.
|
inline |
move to the previous location
Definition at line 261 of file Intrepid2_FunctorIterator.hpp.
References Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::reset().
|
inline |
Getter
Definition at line 142 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 152 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 162 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 172 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 182 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 192 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 203 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Getter
Definition at line 213 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Enumeration index refers to a 1D enumeration of the entries in the View, with dimensions in order of their significance (dimension 0 is the slowest-moving).
Definition at line 286 of file Intrepid2_FunctorIterator.hpp.
|
inline |
The extent of the View in the specified dimension. (Extents in dimensions beyond the rank of the View, but less than 7, are defined to be 1.)
[in] | dimension | - the dimension for which the extent should be returned. |
Definition at line 327 of file Intrepid2_FunctorIterator.hpp.
|
inline |
The index of the current location in the specified dimension. (Indices in dimensions beyond the rank of the View, but less than 7, are defined to be 0.)
[in] | dimension | - the dimension for which the current index should be returned. |
Definition at line 318 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Sets the current location.
[in] | location | - the location as a 7-element array value. |
Definition at line 363 of file Intrepid2_FunctorIterator.hpp.
|
inline |
move to the next location
Definition at line 237 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Definition at line 221 of file Intrepid2_FunctorIterator.hpp.
|
inline |
Resets the location to index 0 in each dimension, starting from the specified dimension.
[in] | from_rank_number | - the first dimension in which to set the index to 0. |
Definition at line 335 of file Intrepid2_FunctorIterator.hpp.
Referenced by Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::decrement().
|
inline |
The enumeration index refers to a 1D enumeration of the entries in the View, with dimensions in order of their significance (dimension 0 is the slowest-moving).
[in] | enumerationIndex | - the index to which the location should be set |
Definition at line 301 of file Intrepid2_FunctorIterator.hpp.
References Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::setLocation().
|
inline |
Sets the current location.
[in] | location | - the location as a 7-element array value. |
Definition at line 346 of file Intrepid2_FunctorIterator.hpp.
Referenced by Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::setEnumerationIndex().
|
inline |
Sets the current location in the specified dimension.
[in] | dim | - which dimension to set the location in |
[in] | i | - the index to use in dimension dim |
Definition at line 355 of file Intrepid2_FunctorIterator.hpp.