Iterate over entries of an MDField<DataT>, a runtime MDField. More...
#include <Phalanx_MDField_Utilities.hpp>
Classes | |
| class | Ptr |
Public Types | |
|
typedef PHX::MDFieldTypeTraits < typename MDField< T > ::array_type >::return_type | reference_type |
| Reference to an entry of the MDField. | |
|
typedef PHX::MDField< T > ::size_type | size_type |
| Index type. | |
Public Member Functions | |
| MDFieldIterator (const PHX::MDField< T > &a) | |
| User constructor. | |
| MDFieldIterator< T > & | operator++ () |
| Increment the iterator. Efficient. | |
| MDFieldIterator< T > & | operator++ (int) |
| Like all postfix ++, this one is inefficient. Convenience only. | |
| bool | done () const |
| Returns whether the iterator has reached the end. | |
| reference_type | ref () const |
| Get a reference to the current value. | |
| reference_type | operator* () const |
Syntactic wrapper to ref(). | |
| Ptr | operator-> () const |
Syntactic wrapper to (*it). . | |
| size_type | idx () const |
| Get the index of the current value. | |
Iterate over entries of an MDField<DataT>, a runtime MDField.
This iterator is one way to replace usage of the deprecated operator[]. Regardless of underlying implementation details, iteration proceeds so that in A(i,j,k), k is the fastest index and i is the slowest one.
Example usage:
1.8.5