Provide read-only and read/write access to constantly sized portions/windows of a linearised buffer with an implied 1D array structure.
More...
|
| | WindowedArray (const NumWindows n, const WindowSize sz, const T initial=T{}) |
| | Constructor.
|
|
| WindowedArray (const WindowedArray &rhs)=default |
|
| WindowedArray (WindowedArray &&rhs)=default |
|
WindowedArray & | operator= (const WindowedArray &rhs)=delete |
|
WindowedArray & | operator= (WindowedArray &&rhs)=default |
|
Idx | numWindows () const |
| | Retrieve number of windows allocated for this array.
|
|
Idx | windowSize () const |
| | Retrieve number of data items per windows.
|
| WriteWindow | operator[] (const Idx window) |
| | Request read/write access to individual window.
|
| ReadWindow | operator[] (const Idx window) const |
| | Request read-only access to individual window.
|
|
const std::vector< T > & | data () const |
| | Get read-only access to full, linearised data items for all windows.
|
| std::vector< T > | getDataDestructively () |
| | Extract full, linearised data items for all windows.
|
template<typename T>
class Opm::RestartIO::Helpers::WindowedArray< T >
Provide read-only and read/write access to constantly sized portions/windows of a linearised buffer with an implied 1D array structure.
Intended as backing store for vectors that have a constant number of items per entity (e.g., N integer data items for each active group at a report step).
- Template Parameters
-
| T | Element type for underlying data items. |