essentially, a read-only variant of ViewIterator, for a general functor (extent_int() and rank() support required)
More...
#include <Intrepid2_FunctorIterator.hpp>
|
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 |
|
|
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 () |
|
|
const FunctorType & | functor_ |
|
Kokkos::Array< int, 7 > | dims_ |
|
Kokkos::Array< int, 7 > | index_ |
|
template<class FunctorType, typename ScalarType, int rank>
class Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >
essentially, a read-only variant of ViewIterator, for a general functor (extent_int() and rank() support required)
Definition at line 140 of file Intrepid2_FunctorIterator.hpp.
◆ FunctorIterator()
template<class FunctorType, typename ScalarType, int rank>
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.
- Parameters
-
[in] | functor | - the functor to iterate over |
Definition at line 149 of file Intrepid2_FunctorIterator.hpp.
◆ decrement()
template<class FunctorType, typename ScalarType, int rank>
◆ get() [1/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [2/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [3/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [4/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [5/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [6/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [7/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ get() [8/8]
template<class FunctorType, typename ScalarType, int rank>
template<int M = rank>
◆ getEnumerationIndex()
template<class FunctorType, typename ScalarType, int rank>
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).
- Returns
- the enumeration index at current location.
Definition at line 319 of file Intrepid2_FunctorIterator.hpp.
◆ getExtent()
template<class FunctorType, typename ScalarType, int rank>
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.)
- Parameters
-
[in] | dimension | - the dimension for which the extent should be returned. |
- Returns
- extent of the View in the specified dimension.
Definition at line 360 of file Intrepid2_FunctorIterator.hpp.
◆ getIndex()
template<class FunctorType, typename ScalarType, int rank>
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.)
- Parameters
-
[in] | dimension | - the dimension for which the current index should be returned. |
- Returns
- index in the specified dimension.
Definition at line 351 of file Intrepid2_FunctorIterator.hpp.
◆ getLocation()
template<class FunctorType, typename ScalarType, int rank>
◆ increment()
template<class FunctorType, typename ScalarType, int rank>
move to the next location
- Returns
- the rank of the leftmost index that was changed; -1 if increment reached the end of the view
Definition at line 270 of file Intrepid2_FunctorIterator.hpp.
◆ nextIncrementRank()
template<class FunctorType, typename ScalarType, int rank>
- Returns
- the leftmost rank ordinal whose index will change on next increment (-1 if next increment will go out of bounds)
Definition at line 254 of file Intrepid2_FunctorIterator.hpp.
◆ reset()
template<class FunctorType, typename ScalarType, int rank>
◆ setEnumerationIndex()
template<class FunctorType, typename ScalarType, int rank>
KOKKOS_INLINE_FUNCTION void Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::setEnumerationIndex |
( |
const int & |
enumerationIndex | ) |
|
|
inline |
◆ setLocation()
template<class FunctorType, typename ScalarType, int rank>
KOKKOS_INLINE_FUNCTION void Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::setLocation |
( |
const Kokkos::Array< int, 7 > & |
location | ) |
|
|
inline |
◆ setLocationInDim()
template<class FunctorType, typename ScalarType, int rank>
KOKKOS_INLINE_FUNCTION void Intrepid2::FunctorIterator< FunctorType, ScalarType, rank >::setLocationInDim |
( |
const int & |
dim, |
|
|
const int & |
i |
|
) |
| |
|
inline |
Sets the current location in the specified dimension.
- Parameters
-
[in] | dim | - which dimension to set the location in |
[in] | i | - the index to use in dimension dim |
Definition at line 388 of file Intrepid2_FunctorIterator.hpp.
The documentation for this class was generated from the following file: