|
| | MultiArray (const MultiArray &)=delete |
| |
| MultiArray & | operator= (const MultiArray &)=delete |
| |
| | MultiArray (MultiArray &&)=default |
| |
| MultiArray & | operator= (MultiArray &&)=default |
| |
| | MultiArray (Extents< RANK > extents, auto initializer) |
| | Primary constructor. initializer is a callable (size_t totalElements) -> StorageType.
|
| |
| | MultiArray (Extents< RANK > extents) |
| | Constructs an array with given extents and unspecified contents (see multiarray::noInit).
|
| |
| template<typename TT > |
| void | assignTo (MultiArrayConstView< TT, RANK > macv) |
| | Element-by-element assignment from a const view of compatible type.
|
| |
| MultiArrayConstView< T, RANK > | constView () const |
| | Explicit const view, useful where implicit conversion is suppressed.
|
| |
| auto | mutableView () |
| | Explicit mutable view.
|
| |
| | operator MultiArrayView< T, RANK > () |
| | Implicit conversion to a mutable view.
|
| |
| T & | operator() (auto &&... i) |
| | Non-const element access, forwarding to the base const overload via const_cast.
|
| |
| const T & | operator() (auto &&... i) const |
| | Const element access. This overload is needed to prevent the non-const overload from shadowing the base.
|
| |
| StorageType & | dataStorage () |
| | Direct access to the underlying storage vector.
|
| |
| const StorageType & | dataStorage () const |
| |
| | MultiArrayView (const MultiArrayView &)=default |
| |
| | MultiArrayView (MultiArrayView &&)=default |
| |
| | MultiArrayView ()=default |
| |
| MultiArrayView & | operator= (const MultiArrayView &)=default |
| |
| MultiArrayView & | operator= (MultiArrayView &&)=default |
| |
| | MultiArrayView (Extents< RANK > extents, Extents< RANK > strides, size_t offset, auto &&... dataView) |
| | Constructs a view with explicit extents, strides, offset, and data span. The offset accumulates from prior slicing operations.
|
| |
| | operator MultiArrayView< const T, RANK > () const |
| | Implicit conversion to a const view (MultiArrayView<const T, RANK>).
|
| |
| void | checkBounds (std::convertible_to< size_t > auto ... i) const |
| | Bounds-check all indices against extents. Active only in debug builds (NDEBUG not defined).
|
| |
| T & | operator() (Extents< RANK > idx) const |
| | Subscript by Extents<RANK> multi-index. Always const — does not modify the view, only potentially the underlying data.
|
| |
| T & | operator() (std::convertible_to< size_t > auto ... i) const |
| | Subscript by individual indices, one per rank. Requires sizeof...(i) == RANK.
|
| |
| T & | operator() (std::convertible_to< size_t > auto i) const |
| | Rank-1 specialization: single-index subscript.
|
| |
| T & | operator() (std::convertible_to< size_t > auto i, std::convertible_to< size_t > auto j) const |
| | Rank-2 specialization: two-index subscript.
|
| |
| auto | operator() (std::convertible_to< size_t > auto i, multiarray::Placeholder) const |
| | Rank-2 row slice: mav(i, _) returns a rank-1 view of row i.
|
| |
| auto | operator() (multiarray::Placeholder, std::convertible_to< size_t > auto j) const |
| | Rank-2 column slice: mav(_, j) returns a rank-1 view of column j.
|
| |
template<
typename T,
size_t RANK>
requires ( !std::is_const_v<
T> )
class cppqedutils::MultiArray< T, RANK >
Owning, move-only, rank-RANK array. Non-copyable; follows value semantics regarding constness.
Derives from MultiArrayConstView<T,RANK> to expose the full view interface. The dataView span in the base is re-seated to data_ after each construction or move.
- Note
- The storage type
std::vector<T> may eventually be replaced by kokkos::View or std::valarray for better HPC integration.