DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Array< T, _row_size, _row_max, _align > Class Template Reference

Core 2D variable-length array container, the storage foundation of DNDSR. More...

#include <Array.hpp>

Inheritance diagram for DNDS::Array< T, _row_size, _row_max, _align >:
[legend]
Collaboration diagram for DNDS::Array< T, _row_size, _row_max, _align >:
[legend]

Classes

class  iterator
 Random-access iterator over rows for a given device backend. More...
 
struct  ReadSerializerMetaResult
 Result type for ReadSerializerMeta. More...
 

Public Types

using self_type = Array< T, _row_size, _row_max, _align >
 
using t_Layout = ArrayLayout< T, _row_size, _row_max, _align >
 
using t_View = ArrayView< T, _row_size, _row_max, _align >
 
using t_Data = host_device_vector< value_type >
 
using t_DataUncompressed = std::vector< std::vector< value_type > >
 
using t_RowStart = host_device_vector< index >
 
using t_pRowStart = ssp< t_RowStart >
 
using t_RowSizes = host_device_vector< rowsize >
 
using t_pRowSizes = ssp< t_RowSizes >
 
template<DeviceBackend B>
using t_deviceView = ArrayDeviceView< B, T, _row_size, _row_max, _align >
 
template<DeviceBackend B>
using t_deviceViewConst = ArrayDeviceView< B, const T, _row_size, _row_max, _align >
 
- Public Types inherited from DNDS::ArrayLayout< T, _row_size, _row_max, _align >
using value_type = T
 

Public Member Functions

t_pRowStart getRowStart ()
 Shared pointer to the row-start index (CSR layout only).
 
t_pRowSizes getRowSizes ()
 Shared pointer to the per-row size vector (TABLE_Max / TABLE_StaticMax).
 
 Array ()=default
 Default-constructed array: empty, no storage.
 
 Array (ObjName objName)
 Named constructor: sets the object name for tracing/debugging. Delegates to the default constructor, then sets the name.
 
index Size () const
 Number of rows currently stored. O(1).
 
rowsize RowSize () const
 Uniform row width for fixed layouts (no row index needed).
 
rowsize DataStride () const
 Number of T elements per row in flat storage (data stride). For TABLE_StaticMax/TABLE_Max, this is _row_max (padded), not RowSize (used). Not valid for CSR (variable stride per row).
 
rowsize RowSize (index iRow) const
 Width used by row iRow in number of T elements.
 
rowsize RowSizeMax () const
 Maximum allowed row width for TABLE_Max / TABLE_StaticMax.
 
rowsize RowSizeField () const
 "Logical" row-field width used by derived (Eigen) arrays: max for padded layouts, uniform width for fixed layouts. Not valid for CSR.
 
rowsize RowSizeField (index iRow) const
 Per-row "field" size for CSR (= actual row width). Invalid elsewhere.
 
bool IfCompressed () const
 (CSR only) Whether the array is in packed / flat form.
 
void CSRDecompress ()
 (CSR only) Switch to the uncompressed (nested vector) representation.
 
void CSRCompress ()
 (CSR only) Pack the nested-vector representation into a flat buffer plus _pRowStart. No-op if already compressed.
 
void Compress ()
 Layout-polymorphic compress: no-op for non-CSR, calls CSRCompress for CSR.
 
void Decompress ()
 Layout-polymorphic decompress: no-op for non-CSR, calls CSRDecompress for CSR.
 
t_DataRawDataVector ()
 Access to the underlying flat buffer (host_device_vector<T>).
 
void Resize (index nSize, rowsize nRow_size_dynamic)
 Resize the array, setting a uniform or maximum row width.
 
void Resize (index nSize)
 Resize using only the row count (layouts with an implicit row width).
 
template<class TFRowSize >
void Resize (index nSize, TFRowSize &&FRowSize)
 Resize a CSR array directly to the compressed form via a width functor.
 
void ResizeRow (index iRow, rowsize nRowSize)
 Change the width of a single row.
 
void ReserveRow (index iRow, rowsize nRowSize)
 Reserve capacity for a CSR decompressed row without changing its size.
 
t_View view ()
 Produce a lightweight, device-agnostic view onto the array.
 
const T & at (index iRow, rowsize iCol) const
 Bounds-checked element access.
 
T & operator() (index iRow, rowsize iCol=0)
 Bounds-checked 2D element access (writable).
 
const T & operator() (index iRow, rowsize iCol=0) const
 Bounds-checked 2D element access (read-only).
 
T * operator[] (index iRow)
 Return a raw pointer to the start of row iRow.
 
const T * operator[] (index iRow) const
 Const row pointer, see the non-const overload.
 
T * data (DeviceBackend B=DeviceBackend::Unknown)
 Raw pointer to the flat data buffer.
 
size_t DataSize () const
 Total number of T elements currently stored in the flat buffer.
 
size_t DataSizeBytes () const
 Flat buffer size in bytes (= DataSize() * sizeof(T)).
 
void CopyRowFrom (index dstRow, const self_type &src, index srcRow)
 Copy raw row data from another Array of the same type. Works for all layouts (StaticFixed, Fixed, CSR, etc.) and is not hidden by derived types that make operator()/operator[] private.
 
template<class TRowSizeFunc >
void ResizeRowsAndCompress (TRowSizeFunc &&rowSizeFunc)
 Set per-row sizes from a source, applying an index mapping, then compress. For CSR layout only. rowSizeFunc(i) returns the desired row size for row i. Not hidden by derived types that make ResizeRow private.
 
size_t FullSizeBytes () const
 Total footprint in bytes including structural arrays.
 
std::size_t hash ()
 Combined hash of size, structural arrays, and data.
 
constexpr DataLayout GetDataLayout ()
 Runtime accessor for the layout tag (constexpr-folded).
 
void clone (const self_type &R)
 Shallow clone: copies all metadata and shares structural/data storage.
 
void CopyData (const self_type &R)
 Deep copy alias. Currently delegates to clone; kept for API compatibility and to allow a future true deep-copy implementation.
 
self_typeoperator= (const self_type &R)
 Copy-assignment; implemented via clone with self-assign guard.
 
 Array (const self_type &R)
 Copy constructor (same semantics as clone).
 
void SwapData (self_type &R)
 Swap the storage of two arrays in-place.
 
void __WriteSerializerData (const Serializer::SerializerBaseSSP &serializerP, Serializer::ArrayGlobalOffset offset)
 
void __ReadSerializerData (const Serializer::SerializerBaseSSP &serializerP, Serializer::ArrayGlobalOffset &offset)
 
void WriteSerializer (Serializer::SerializerBaseSSP serializerP, const std::string &name, Serializer::ArrayGlobalOffset offset, Serializer::ArrayGlobalOffset dataOffset=Serializer::ArrayGlobalOffset_Unknown)
 Serialize (write) array data to a serializer.
 
void ReadSerializer (Serializer::SerializerBaseSSP serializerP, const std::string &name, Serializer::ArrayGlobalOffset &offset)
 Convenience overload that discards the dataOffset output.
 
void ReadSerializer (Serializer::SerializerBaseSSP serializerP, const std::string &name, Serializer::ArrayGlobalOffset &offset, Serializer::ArrayGlobalOffset &dataOffset)
 Deserialize (read) array data from a serializer.
 
ReadSerializerMetaResult ReadSerializerMeta (Serializer::SerializerBaseSSP serializerP, const std::string &name)
 Reads only metadata from a serialized array without reading data.
 
void __ReadSerializerStructuralAndResolveDataOffset (const Serializer::SerializerBaseSSP &serializerP, Serializer::ArrayGlobalOffset &offset, Serializer::ArrayGlobalOffset &dataOffset)
 Reads structural data (pRowStart / pRowSizes) and resolves dataOffset.
 
void __ReadSerializerDataAndPropagateOffset (const Serializer::SerializerBaseSSP &serializerP, Serializer::ArrayGlobalOffset &offset, Serializer::ArrayGlobalOffset &dataOffset)
 Reads flat data and propagates resolved offsets back to the caller.
 
void to_host ()
 Mirror the flat/structural buffers back to host memory.
 
void to_device (DeviceBackend backend=DeviceBackend::Host)
 Mirror the flat/structural buffers to a target device (e.g. CUDA).
 
void clear_device ()
 Release any device-side mirror of this array's buffers.
 
template<DeviceBackend B>
t_deviceView< B > deviceView ()
 Mutable device-callable view (Eigen::Map-style row access on GPU).
 
template<DeviceBackend B>
t_deviceViewConst< B > deviceView () const
 Const device-callable view. See non-const overload.
 
DeviceBackend device () const
 Current device backend the data is mirrored on, or Unknown if host-only.
 
template<DeviceBackend B>
iterator< B > begin ()
 Iterator to the first row, viewed on device backend B.
 
template<DeviceBackend B>
iterator< B > end ()
 Iterator one past the last row, viewed on device backend B.
 
- Public Member Functions inherited from DNDS::ObjectNaming
 ObjectNaming ()=default
 
 ObjectNaming (const ObjectNaming &)=default
 
 ObjectNaming (ObjectNaming &&)=default
 
ObjectNamingoperator= (const ObjectNaming &)=default
 
ObjectNamingoperator= (ObjectNaming &&)=default
 
 ~ObjectNaming ()=default
 
void setObjectName (const std::string &name)
 
const std::string & getObjectName () const
 
std::string getObjectIdentity (const std::string &sig) const
 

Static Public Member Functions

static constexpr bool IsCSR ()
 
static constexpr DataLayout GetDataLayoutStatic ()
 Compile-time layout tag (one of TABLE_StaticFixed, TABLE_Fixed, TABLE_StaticMax, TABLE_Max, CSR).
 
- Static Public Member Functions inherited from DNDS::ArrayLayout< T, _row_size, _row_max, _align >
static constexpr DataLayout _GetDataLayout ()
 Deduce the DataLayout tag from the template parameters.
 
static std::string GetArrayName ()
 Human-readable type identifier including element typeid, sizes, and alignment.
 
static std::string GetArraySignature ()
 Compiler-independent identifier used by serializers to tag an array.
 
static std::string GetArraySignatureRelaxed ()
 Signature with _row_size / _row_max replaced by DynamicSize.
 
static std::tuple< int, int, int, int > ParseArraySignatureTuple (const std::string &v)
 Parse a signature string into (sizeof_T, row_size, row_max, align).
 
static bool ArraySignatureIsCompatible (const std::string &v)
 Whether a stored signature can be read into this array type.
 

Protected Member Functions

bool IfCompressed_ () const
 

Protected Attributes

t_pRowStart _pRowStart
 
t_pRowSizes _pRowSizes
 
t_Data _data
 
DeviceBackend deviceBackend = DeviceBackend::Unknown
 
t_DataUncompressed _dataUncompressed
 
index _size = 0
 
rowsize _row_size_dynamic = 0
 

Friends

std::ostream & operator<< (std::ostream &o, const Array< T, _row_size, _row_max, _align > &A)
 Pretty-print rows, one per line, tab-separated.
 

Additional Inherited Members

- Static Public Attributes inherited from DNDS::ArrayLayout< T, _row_size, _row_max, _align >
static const rowsize al = _align
 
static const rowsize rs = _row_size
 
static const rowsize rm = _row_max
 
static const size_t sizeof_T = sizeof(value_type)
 
static const rowsize s_T = al == NoAlign ? sizeof_T : (sizeof_T / al + 1) * al
 
static const DataLayout _dataLayout = _GetDataLayout()
 
static const bool isCSR = _dataLayout == CSR
 

Detailed Description

template<class T, rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
class DNDS::Array< T, _row_size, _row_max, _align >

Core 2D variable-length array container, the storage foundation of DNDSR.

Array is a single template that unifies five distinct storage layouts used throughout the CFD code base (cell volumes, conservative variables, mesh connectivity, reconstruction coefficients, etc.). The layout is chosen at compile time by combining _row_size and _row_max:

Array layouts

_row_size>=0 _row_size==DynamicSize _row_size==NonUniformSize
_row_max>=0 TABLE_StaticFixed TABLE_Fixed TABLE_StaticMax
_row_max==DynamicSize TABLE_StaticFixed _row_max ignored TABLE_Fixed _row_max ignored TABLE_Max
_row_max==NonUniformSize TABLE_StaticFixed _row_max ignored TABLE_Fixed _row_max ignored CSR

Concrete semantics per layout:

  • TABLE_StaticFixed: every row has _row_size elements (compile-time constant). Used for Euler state vectors (5 reals), cell volumes (1), coordinates (3), etc.
  • TABLE_Fixed: every row has the same runtime-determined width (_row_size_dynamic). Used when the width depends on solver settings (e.g., reconstruction polynomial order).
  • TABLE_StaticMax / TABLE_Max: rows are padded to a maximum width (_row_max compile-time or runtime), with an auxiliary _pRowSizes vector giving the actual used width per row. Offers O(1) random access at the cost of wasted space for short rows.
  • CSR: flat buffer plus _pRowStart[n+1]. No wasted space but needs pointer indirection. Two internal sub-states: compressed (flat) and decompressed (vector<vector<T>>, used during incremental row growth). Compress() must be called before MPI communication or serialization.

The class inherits from ObjectNaming so each instance may carry a human-readable name (e.g. "coords", "cell2node") shown in assertions.

Template Parameters
TElement type. Typically real (double) or index (int64_t). Must be trivially copyable for CUDA / MPI paths.
_row_sizeRow width:
_row_maxOnly relevant when _row_size == NonUniformSize:
_alignAlignment hint (currently only NoAlign is used).
See also
ArrayBasic.hpp for the layout enum and signature parsing.
ArrayTransformer for adding MPI ghost communication.
ArrayPair for the typical father/son bundle.
docs/architecture/array_infrastructure.md, docs/guides/array_usage.md.
Todo:
Implement the _align feature (currently ignored).

Definition at line 96 of file Array.hpp.

Member Typedef Documentation

◆ self_type

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::self_type = Array<T, _row_size, _row_max, _align>

Definition at line 99 of file Array.hpp.

◆ t_Data

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_Data = host_device_vector<value_type>

Definition at line 123 of file Array.hpp.

◆ t_DataUncompressed

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_DataUncompressed = std::vector<std::vector<value_type> >

Definition at line 125 of file Array.hpp.

◆ t_deviceView

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
using DNDS::Array< T, _row_size, _row_max, _align >::t_deviceView = ArrayDeviceView<B, T, _row_size, _row_max, _align>

Definition at line 1240 of file Array.hpp.

◆ t_deviceViewConst

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
using DNDS::Array< T, _row_size, _row_max, _align >::t_deviceViewConst = ArrayDeviceView<B, const T, _row_size, _row_max, _align>

Definition at line 1243 of file Array.hpp.

◆ t_Layout

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_Layout = ArrayLayout<T, _row_size, _row_max, _align>

Definition at line 101 of file Array.hpp.

◆ t_pRowSizes

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_pRowSizes = ssp<t_RowSizes>

Definition at line 133 of file Array.hpp.

◆ t_pRowStart

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_pRowStart = ssp<t_RowStart>

Definition at line 129 of file Array.hpp.

◆ t_RowSizes

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_RowSizes = host_device_vector<rowsize>

Definition at line 132 of file Array.hpp.

◆ t_RowStart

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_RowStart = host_device_vector<index>

Definition at line 128 of file Array.hpp.

◆ t_View

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
using DNDS::Array< T, _row_size, _row_max, _align >::t_View = ArrayView<T, _row_size, _row_max, _align>

Definition at line 117 of file Array.hpp.

Constructor & Destructor Documentation

◆ Array() [1/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
DNDS::Array< T, _row_size, _row_max, _align >::Array ( )
default

Default-constructed array: empty, no storage.

◆ Array() [2/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
DNDS::Array< T, _row_size, _row_max, _align >::Array ( ObjName  objName)
inlineexplicit

Named constructor: sets the object name for tracing/debugging. Delegates to the default constructor, then sets the name.

Definition at line 160 of file Array.hpp.

Here is the call graph for this function:

◆ Array() [3/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
DNDS::Array< T, _row_size, _row_max, _align >::Array ( const self_type R)
inline

Copy constructor (same semantics as clone).

Definition at line 821 of file Array.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ __ReadSerializerData()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::__ReadSerializerData ( const Serializer::SerializerBaseSSP serializerP,
Serializer::ArrayGlobalOffset offset 
)
inline

Definition at line 879 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ReadSerializerDataAndPropagateOffset()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::__ReadSerializerDataAndPropagateOffset ( const Serializer::SerializerBaseSSP serializerP,
Serializer::ArrayGlobalOffset offset,
Serializer::ArrayGlobalOffset dataOffset 
)
inline

Reads flat data and propagates resolved offsets back to the caller.

Parameters
serializerPSerializer instance (already at the array's sub-path).
offset[in/out] Row-level offset; updated from dataOffset for non-CSR.
dataOffset[in/out] Element-level data offset; may be updated from Unknown to Parts-resolved by __ReadSerializerData.

Definition at line 1176 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ReadSerializerStructuralAndResolveDataOffset()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::__ReadSerializerStructuralAndResolveDataOffset ( const Serializer::SerializerBaseSSP serializerP,
Serializer::ArrayGlobalOffset offset,
Serializer::ArrayGlobalOffset dataOffset 
)
inline

Reads structural data (pRowStart / pRowSizes) and resolves dataOffset.

After metadata has been read and _size / _row_size_dynamic set, this method reads layout-specific structural data from the serializer and computes the element-level dataOffset from the row-level offset.

Parameters
serializerPSerializer instance (already at the array's sub-path).
offset[in/out] Row-level offset; updated for non-CSR if dataOffset could be derived.
dataOffset[out] Element-level data offset resolved from structural data (CSR: from global pRowStart; non-CSR: offset * DataStride).

Definition at line 1130 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __WriteSerializerData()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::__WriteSerializerData ( const Serializer::SerializerBaseSSP serializerP,
Serializer::ArrayGlobalOffset  offset 
)
inline

Definition at line 857 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ at()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
const T & DNDS::Array< T, _row_size, _row_max, _align >::at ( index  iRow,
rowsize  iCol 
) const
inline

Bounds-checked element access.

Asserts that iRow and iCol are in range (taking the used row size into account, not just the stride). Works for every layout.

Parameters
iRowRow index in [0, Size()).
iColColumn index in [0, RowSize(iRow)).

Definition at line 573 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
iterator< B > DNDS::Array< T, _row_size, _row_max, _align >::begin ( )
inline

Iterator to the first row, viewed on device backend B.

Definition at line 1327 of file Array.hpp.

◆ clear_device()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::clear_device ( )
inline

Release any device-side mirror of this array's buffers.

Definition at line 1228 of file Array.hpp.

◆ clone()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::clone ( const self_type R)
inline

Shallow clone: copies all metadata and shares structural/data storage.

Copies _size, _row_size_dynamic, device backend, and the nested-vector storage. The _data, _pRowStart, _pRowSizes members are host_device_vector / shared_ptr, so they share ownership with the source; subsequent modifications to one may affect the other.

Definition at line 791 of file Array.hpp.

Here is the caller graph for this function:

◆ Compress()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::Compress ( )
inline

Layout-polymorphic compress: no-op for non-CSR, calls CSRCompress for CSR.

Definition at line 355 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyData()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::CopyData ( const self_type R)
inline

Deep copy alias. Currently delegates to clone; kept for API compatibility and to allow a future true deep-copy implementation.

Definition at line 805 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyRowFrom()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::CopyRowFrom ( index  dstRow,
const self_type src,
index  srcRow 
)
inline

Copy raw row data from another Array of the same type. Works for all layouts (StaticFixed, Fixed, CSR, etc.) and is not hidden by derived types that make operator()/operator[] private.

Definition at line 706 of file Array.hpp.

Here is the call graph for this function:

◆ CSRCompress()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::CSRCompress ( )
inline

(CSR only) Pack the nested-vector representation into a flat buffer plus _pRowStart. No-op if already compressed.

Row widths are frozen; further per-row resizing requires another Decompress. Mandatory before MPI ghost exchange, CUDA transfer, or serialization.

any better way?

Definition at line 324 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CSRDecompress()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::CSRDecompress ( )
inline

(CSR only) Switch to the uncompressed (nested vector) representation.

Copies each row out of the flat buffer into an entry of _dataUncompressed, then clears the flat buffer. No-op if already uncompressed. After this, ResizeRow and ReserveRow may be used to reshape individual rows.

Definition at line 304 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
T * DNDS::Array< T, _row_size, _row_max, _align >::data ( DeviceBackend  B = DeviceBackend::Unknown)
inline

Raw pointer to the flat data buffer.

Parameters
BTarget device. DeviceBackend::Unknown (default) returns the host pointer; otherwise returns the device pointer (must match the array's current device).

Definition at line 673 of file Array.hpp.

Here is the call graph for this function:

◆ DataSize()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
size_t DNDS::Array< T, _row_size, _row_max, _align >::DataSize ( ) const
inline

Total number of T elements currently stored in the flat buffer.

For CSR, requires the array to be compressed.

Definition at line 688 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DataSizeBytes()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
size_t DNDS::Array< T, _row_size, _row_max, _align >::DataSizeBytes ( ) const
inline

Flat buffer size in bytes (= DataSize() * sizeof(T)).

Definition at line 698 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DataStride()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::DataStride ( ) const
inline

Number of T elements per row in flat storage (data stride). For TABLE_StaticMax/TABLE_Max, this is _row_max (padded), not RowSize (used). Not valid for CSR (variable stride per row).

Definition at line 192 of file Array.hpp.

Here is the caller graph for this function:

◆ Decompress()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::Decompress ( )
inline

Layout-polymorphic decompress: no-op for non-CSR, calls CSRDecompress for CSR.

Definition at line 361 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ device()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
DeviceBackend DNDS::Array< T, _row_size, _row_max, _align >::device ( ) const
inline

Current device backend the data is mirrored on, or Unknown if host-only.

Definition at line 1292 of file Array.hpp.

◆ deviceView() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
t_deviceView< B > DNDS::Array< T, _row_size, _row_max, _align >::deviceView ( )
inline

Mutable device-callable view (Eigen::Map-style row access on GPU).

Template Parameters
BDevice backend; must either match the array's current device or be DeviceBackend::Host (which yields a host-backed view).

Definition at line 1249 of file Array.hpp.

Here is the call graph for this function:

◆ deviceView() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
t_deviceViewConst< B > DNDS::Array< T, _row_size, _row_max, _align >::deviceView ( ) const
inline

Const device-callable view. See non-const overload.

Definition at line 1271 of file Array.hpp.

Here is the call graph for this function:

◆ end()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<DeviceBackend B>
iterator< B > DNDS::Array< T, _row_size, _row_max, _align >::end ( )
inline

Iterator one past the last row, viewed on device backend B.

Definition at line 1334 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FullSizeBytes()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
size_t DNDS::Array< T, _row_size, _row_max, _align >::FullSizeBytes ( ) const
inline

Total footprint in bytes including structural arrays.

Sums the flat data buffer, _pRowStart (if any), and _pRowSizes (if any). Approximate because shared-ownership of row structures is not deduplicated.

Definition at line 735 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataLayout()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
constexpr DataLayout DNDS::Array< T, _row_size, _row_max, _align >::GetDataLayout ( )
inlineconstexpr

Runtime accessor for the layout tag (constexpr-folded).

Definition at line 784 of file Array.hpp.

Here is the caller graph for this function:

◆ GetDataLayoutStatic()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
static constexpr DataLayout DNDS::Array< T, _row_size, _row_max, _align >::GetDataLayoutStatic ( )
inlinestaticconstexpr

Compile-time layout tag (one of TABLE_StaticFixed, TABLE_Fixed, TABLE_StaticMax, TABLE_Max, CSR).

Definition at line 782 of file Array.hpp.

◆ getRowSizes()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_pRowSizes DNDS::Array< T, _row_size, _row_max, _align >::getRowSizes ( )
inline

Shared pointer to the per-row size vector (TABLE_Max / TABLE_StaticMax).

For padded layouts, records the number of "used" columns in each row.

Definition at line 152 of file Array.hpp.

◆ getRowStart()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_pRowStart DNDS::Array< T, _row_size, _row_max, _align >::getRowStart ( )
inline

Shared pointer to the row-start index (CSR layout only).

_pRowStart->at(i) gives the flat-buffer offset of row i. Size is Size()+1; the sentinel at the end equals DataSize().

Definition at line 149 of file Array.hpp.

◆ hash()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
std::size_t DNDS::Array< T, _row_size, _row_max, _align >::hash ( )
inline

Combined hash of size, structural arrays, and data.

Byte-hashes non-hashable elements. Intended for testing / equality diagnostics; not guaranteed cryptographically strong.

Definition at line 748 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IfCompressed()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
bool DNDS::Array< T, _row_size, _row_max, _align >::IfCompressed ( ) const
inline

(CSR only) Whether the array is in packed / flat form.

true means data sits in a single _data buffer plus _pRowStart; false means rows live in a vector<vector<T>> (_dataUncompressed), which allows per-row ResizeRow(). MPI / serialization / CUDA require the compressed form – call Compress() first.

Definition at line 294 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IfCompressed_()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
bool DNDS::Array< T, _row_size, _row_max, _align >::IfCompressed_ ( ) const
inlineprotected

Definition at line 275 of file Array.hpp.

Here is the caller graph for this function:

◆ IsCSR()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
static constexpr bool DNDS::Array< T, _row_size, _row_max, _align >::IsCSR ( )
inlinestaticconstexpr

Definition at line 119 of file Array.hpp.

◆ operator()() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
T & DNDS::Array< T, _row_size, _row_max, _align >::operator() ( index  iRow,
rowsize  iCol = 0 
)
inline

Bounds-checked 2D element access (writable).

Convenience wrapper around at. iCol defaults to 0 so arr(i) accesses the first column, useful for single-column layouts.

Definition at line 607 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
const T & DNDS::Array< T, _row_size, _row_max, _align >::operator() ( index  iRow,
rowsize  iCol = 0 
) const
inline

Bounds-checked 2D element access (read-only).

Definition at line 613 of file Array.hpp.

Here is the call graph for this function:

◆ operator=()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
self_type & DNDS::Array< T, _row_size, _row_max, _align >::operator= ( const self_type R)
inline

Copy-assignment; implemented via clone with self-assign guard.

Definition at line 812 of file Array.hpp.

Here is the call graph for this function:

◆ operator[]() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
T * DNDS::Array< T, _row_size, _row_max, _align >::operator[] ( index  iRow)
inline

Return a raw pointer to the start of row iRow.

Fast, untyped access used by stencil loops. Derived classes (e.g. ArrayEigenVector, ArrayEigenMatrix) override this to return typed Eigen maps instead of T*.

Parameters
iRowRow index. For CSR compressed, iRow == Size() is allowed and returns the past-the-end pointer, useful for computing the flat buffer end in sweeps.
Returns
Pointer to the first element of row iRow.

Definition at line 630 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
const T * DNDS::Array< T, _row_size, _row_max, _align >::operator[] ( index  iRow) const
inline

Const row pointer, see the non-const overload.

Definition at line 664 of file Array.hpp.

◆ RawDataVector()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_Data & DNDS::Array< T, _row_size, _row_max, _align >::RawDataVector ( )
inline

Access to the underlying flat buffer (host_device_vector<T>).

For CSR, asserts that the array is compressed. Mutating the buffer bypasses all row-size bookkeeping – use with care.

Definition at line 370 of file Array.hpp.

Here is the call graph for this function:

◆ ReadSerializer() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::ReadSerializer ( Serializer::SerializerBaseSSP  serializerP,
const std::string &  name,
Serializer::ArrayGlobalOffset offset 
)
inline

Convenience overload that discards the dataOffset output.

See also
ReadSerializer(SerializerBaseSSP, const std::string&, ArrayGlobalOffset&, ArrayGlobalOffset&)

Definition at line 992 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSerializer() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::ReadSerializer ( Serializer::SerializerBaseSSP  serializerP,
const std::string &  name,
Serializer::ArrayGlobalOffset offset,
Serializer::ArrayGlobalOffset dataOffset 
)
inline

Deserialize (read) array data from a serializer.

Reads metadata (array_sig, size, row_size_dynamic), structural data (pRowStart for CSR, pRowSizes for TABLE_Max/StaticMax), and the flat data buffer from a sub-path name under the serializer's current path.

This method is called by ParArray::ReadSerializer. Users should call the ParArray version, which handles EvenSplit resolution and CSR offset computation.

Input offset must NOT be EvenSplit; ParArray resolves that before calling.

Parameters
serializerPSerializer instance (JSON per-rank or H5 collective).
nameSub-path name for this array.
offset[in/out] Row-level offset.
  • In: Unknown (same-np, serializer uses rank_offsets) or isDist({localRows, globalRowStart}).
  • Out: updated to the resolved row-level position after reading (derived from dataOffset / DataStride for non-CSR).
dataOffset[out] Element-level data offset resolved during the read.
  • Per-rank or Unknown offset: stays Unknown.
  • Collective isDist non-CSR: {localRows * DataStride(), globalRowStart * DataStride()}.
  • Collective CSR: {localDataCount, globalDataStart}, derived from the stored global pRowStart.

Definition at line 1023 of file Array.hpp.

Here is the call graph for this function:

◆ ReadSerializerMeta()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
ReadSerializerMetaResult DNDS::Array< T, _row_size, _row_max, _align >::ReadSerializerMeta ( Serializer::SerializerBaseSSP  serializerP,
const std::string &  name 
)
inline

Reads only metadata from a serialized array without reading data.

Navigates to sub-path name and reads array_sig, row_size_dynamic, and size. Does NOT read structural data (pRowStart, pRowSizes) or the flat data buffer. The array's internal state is not modified.

Derived types (ArrayEigenMatrix, ArrayEigenUniMatrixBatch) override this method to also read their own extra metadata and to call the base version with the "array" sub-path they wrap around the base Array serialization.

Parameters
serializerPSerializer instance.
nameSub-path name for this array.
Returns
Metadata: array_sig, row_size_dynamic, size (local size for per-rank; 0 for collective without ParArray).

Definition at line 1104 of file Array.hpp.

Here is the caller graph for this function:

◆ ReserveRow()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::ReserveRow ( index  iRow,
rowsize  nRowSize 
)
inline

Reserve capacity for a CSR decompressed row without changing its size.

Analogous to std::vector::reserve for the nested row buffer. CSR-only, decompressed-only.

Definition at line 536 of file Array.hpp.

Here is the call graph for this function:

◆ Resize() [1/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::Resize ( index  nSize)
inline

Resize using only the row count (layouts with an implicit row width).

Valid for:

  • TABLE_StaticFixed / TABLE_StaticMax (width comes from template params);
  • CSR decompressed (rows start empty, grow via ResizeRow). Asserts for other layouts – use the two-argument overload instead.
    Parameters
    nSizeNew number of rows.

Definition at line 432 of file Array.hpp.

Here is the call graph for this function:

◆ Resize() [2/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::Resize ( index  nSize,
rowsize  nRow_size_dynamic 
)
inline

Resize the array, setting a uniform or maximum row width.

Invalidates all existing data and resets row-size metadata.

Layout-specific semantics:

  • TABLE_StaticFixed: nRow_size_dynamic must equal rs.
  • TABLE_StaticMax: nRow_size_dynamic must equal rm.
  • TABLE_Fixed: sets the runtime uniform row width.
  • TABLE_Max: sets the runtime maximum row width (per-row sizes start at 0).
  • CSR: requires the array to be decompressed; allocates nSize empty rows (nested vectors sized to nRow_size_dynamic).
Parameters
nSizeNew number of rows.
nRow_size_dynamicRow width (uniform layouts) or max width (padded layouts) or initial row length (CSR).

Definition at line 395 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Resize() [3/3]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<class TFRowSize >
void DNDS::Array< T, _row_size, _row_max, _align >::Resize ( index  nSize,
TFRowSize &&  FRowSize 
)
inline

Resize a CSR array directly to the compressed form via a width functor.

CSR-only. Allocates nSize+1 _pRowStart entries populated from the prefix sum of FRowSize(i), then sizes the flat buffer to match. No nested-vector intermediate step; the array is compressed on return.

Template Parameters
TFRowSizeCallable with signature rowsize(index).
Parameters
nSizeNew number of rows.
FRowSizeWidth-of-row-i functor.

Definition at line 477 of file Array.hpp.

Here is the call graph for this function:

◆ ResizeRow()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::ResizeRow ( index  iRow,
rowsize  nRowSize 
)
inline

Change the width of a single row.

Valid for CSR (decompressed only) and TABLE_*Max. For TABLE_*Max, the new size must not exceed the configured maximum and the per-row-size vector is copied-on-write if shared with another array. For CSR, the array must be uncompressed; call Decompress first.

Parameters
iRowRow index in [0, Size()).
nRowSizeNew width in T elements.

Definition at line 504 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResizeRowsAndCompress()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
template<class TRowSizeFunc >
void DNDS::Array< T, _row_size, _row_max, _align >::ResizeRowsAndCompress ( TRowSizeFunc &&  rowSizeFunc)
inline

Set per-row sizes from a source, applying an index mapping, then compress. For CSR layout only. rowSizeFunc(i) returns the desired row size for row i. Not hidden by derived types that make ResizeRow private.

Definition at line 723 of file Array.hpp.

Here is the call graph for this function:

◆ RowSize() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::RowSize ( ) const
inline

Uniform row width for fixed layouts (no row index needed).

Valid only for TABLE_Fixed and TABLE_StaticFixed; asserts otherwise.

Returns
Width in number of T elements.

Definition at line 176 of file Array.hpp.

Here is the caller graph for this function:

◆ RowSize() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::RowSize ( index  iRow) const
inline

Width used by row iRow in number of T elements.

Works for every layout:

  • TABLE_*Fixed: returns the uniform row width (iRow ignored for value);
  • TABLE_*Max: returns _pRowSizes->at(iRow);
  • CSR: returns pRowStart[iRow+1] - pRowStart[iRow] when compressed, else the nested vector size.
    Parameters
    iRowRow index in [0, Size()). Asserted in non-fixed layouts.

Definition at line 214 of file Array.hpp.

Here is the call graph for this function:

◆ RowSizeField() [1/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::RowSizeField ( ) const
inline

"Logical" row-field width used by derived (Eigen) arrays: max for padded layouts, uniform width for fixed layouts. Not valid for CSR.

Definition at line 255 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RowSizeField() [2/2]

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::RowSizeField ( index  iRow) const
inline

Per-row "field" size for CSR (= actual row width). Invalid elsewhere.

Definition at line 266 of file Array.hpp.

Here is the call graph for this function:

◆ RowSizeMax()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::RowSizeMax ( ) const
inline

Maximum allowed row width for TABLE_Max / TABLE_StaticMax.

Returns the compile-time rm for TABLE_StaticMax or the dynamic max (_row_size_dynamic) for TABLE_Max. Asserts for other layouts.

Definition at line 245 of file Array.hpp.

Here is the caller graph for this function:

◆ Size()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
index DNDS::Array< T, _row_size, _row_max, _align >::Size ( ) const
inline

Number of rows currently stored. O(1).

Definition at line 171 of file Array.hpp.

Here is the caller graph for this function:

◆ SwapData()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::SwapData ( self_type R)
inline

Swap the storage of two arrays in-place.

Both arrays must already have identical logical size and flat-buffer size. Swaps only what the current layout uses (flat buffer plus structural pointers, or the nested vectors for CSR decompressed).

Definition at line 831 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_device()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::to_device ( DeviceBackend  backend = DeviceBackend::Host)
inline

Mirror the flat/structural buffers to a target device (e.g. CUDA).

CSR arrays must be compressed. backend must match a supported backend from DeviceBackend; see DeviceStorage.hpp.

Definition at line 1213 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_host()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::to_host ( )
inline

Mirror the flat/structural buffers back to host memory.

CSR arrays must be compressed before calling. After this the array still has a device mirror unless clear_device is also called.

Definition at line 1200 of file Array.hpp.

Here is the call graph for this function:

◆ view()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_View DNDS::Array< T, _row_size, _row_max, _align >::view ( )
inline

Produce a lightweight, device-agnostic view onto the array.

The returned ArrayView captures pointers and sizes but does not own any storage. It is the type that implements actual operator[] indexing for all layouts; it is also host/device-callable and is the building block for ArrayDeviceView on CUDA.

Definition at line 559 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteSerializer()

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
void DNDS::Array< T, _row_size, _row_max, _align >::WriteSerializer ( Serializer::SerializerBaseSSP  serializerP,
const std::string &  name,
Serializer::ArrayGlobalOffset  offset,
Serializer::ArrayGlobalOffset  dataOffset = Serializer::ArrayGlobalOffset_Unknown 
)
inline

Serialize (write) array data to a serializer.

Writes metadata (array_sig, array_type, size, row_size_dynamic), structural data (pRowStart for CSR, pRowSizes for TABLE_Max/StaticMax), and the flat data buffer into a sub-path name under the serializer's current path.

This method is called by ParArray::WriteSerializer. Users should call the ParArray version, which handles MPI coordination and CSR global offsets.

Parameters
serializerPSerializer instance (JSON per-rank or H5 collective).
nameSub-path name under which the array is stored.
offset[in] Row-level partitioning offset. Typically Parts (serializer computes per-rank offsets automatically).
dataOffset[in] Element-level data range for this rank.
  • Per-rank or non-CSR: Unknown (default). Array writes pRowStart in local coordinates.
  • Collective CSR: must be isDist() = {localDataCount, globalDataStart}, computed by ParArray via MPI_Scan. Array skips pRowStart (ParArray writes it separately in global coordinates). Asserted for collective CSR.

Definition at line 939 of file Array.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
std::ostream & operator<< ( std::ostream &  o,
const Array< T, _row_size, _row_max, _align > &  A 
)
friend

Pretty-print rows, one per line, tab-separated.

Definition at line 769 of file Array.hpp.

Member Data Documentation

◆ _data

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_Data DNDS::Array< T, _row_size, _row_max, _align >::_data
protected

Definition at line 138 of file Array.hpp.

◆ _dataUncompressed

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_DataUncompressed DNDS::Array< T, _row_size, _row_max, _align >::_dataUncompressed
protected

Definition at line 141 of file Array.hpp.

◆ _pRowSizes

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_pRowSizes DNDS::Array< T, _row_size, _row_max, _align >::_pRowSizes
protected

Definition at line 137 of file Array.hpp.

◆ _pRowStart

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
t_pRowStart DNDS::Array< T, _row_size, _row_max, _align >::_pRowStart
protected

Definition at line 136 of file Array.hpp.

◆ _row_size_dynamic

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
rowsize DNDS::Array< T, _row_size, _row_max, _align >::_row_size_dynamic = 0
protected

Definition at line 144 of file Array.hpp.

◆ _size

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
index DNDS::Array< T, _row_size, _row_max, _align >::_size = 0
protected

Definition at line 143 of file Array.hpp.

◆ deviceBackend

template<class T , rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
DeviceBackend DNDS::Array< T, _row_size, _row_max, _align >::deviceBackend = DeviceBackend::Unknown
protected

Definition at line 139 of file Array.hpp.


The documentation for this class was generated from the following file: