10#include "../ArrayTransformer.hpp"
55 template <
class t_matrices_elem>
81 template <DeviceBackend B>
84 template <DeviceBackend B>
87 template <DeviceBackend B>
93 template <DeviceBackend B>
103 template <DeviceBackend B>
127 template <DeviceBackend B>
133 template <DeviceBackend B>
Device-callable views and on-buffer matrix-batch helpers for ArrayEigenMatrixBatch (variable-sized ma...
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
#define DNDS_DEVICE_CALLABLE
Device memory abstraction layer with backend-specific storage and factory creation.
Non-owning device-callable view of an Array, specialised per DeviceBackend.
Element iterator for ArrayEigenMatrixBatch, yielding MatrixBatch per row.
DNDS_DEVICE_CALLABLE ~iterator()=default
DNDS_DEVICE_CALLABLE reference operator*()
DNDS_DEVICE_CALLABLE iterator(const iterator &)=default
DNDS_DEVICE_CALLABLE iterator(const view_type &n_view, index n_iRow)
std::random_access_iterator_tag iterator_category
CSR array storing a variable-sized batch of Eigen matrices per row.
ArrayEigenMatrixBatchDeviceView< B, real > t_deviceView
because no extra data than Array<>
ArrayEigenMatrixBatch(const t_self &R)=default
t_map operator()(index i, rowsize j)
void InitializeWriteRow(index i, const std::vector< t_matrices_elem > &matrices)
MatrixBatch< real > operator[](index i)
void clone(const t_self &R)
typename MatrixBatch< real >::t_matrix t_matrix
t_self & operator=(const t_self &R)=default
typename MatrixBatch< real >::t_map t_map
CRTP base for row-granularity iterators over an Array / ArrayView.
std::ptrdiff_t difference_type
DNDS_DEVICE_CALLABLE index Size() const
Number of rows in the viewed array.
void to_device(DeviceBackend backend=DeviceBackend::Host)
Mirror the flat/structural buffers to a target device (e.g. CUDA).
T * operator[](index iRow)
Return a raw pointer to the start of row iRow.
rowsize RowSize() const
Uniform row width for fixed layouts (no row index needed).
void to_host()
Mirror the flat/structural buffers back to host memory.
void ResizeRow(index iRow, rowsize nRowSize)
Change the width of a single row.
index Size() const
Number of rows currently stored. O(1).
Packed variable-shape matrix-batch layout inside a flat buffer.
Eigen::Matrix< std::remove_cv_t< real_T >, Eigen::Dynamic, Eigen::Dynamic > t_matrix
std::conditional_t< std::is_const_v< real_T >, t_map_const, Eigen::Map< t_matrix, Eigen::Unaligned > > t_map
MPI-aware Array: adds a communicator, rank, and global index mapping.
void WriteSerializer(Serializer::SerializerBaseSSP serializerP, const std::string &name, Serializer::ArrayGlobalOffset offset)
Serialize (write) the parallel array with MPI-aware metadata.
void ReadSerializer(Serializer::SerializerBaseSSP serializerP, const std::string &name, Serializer::ArrayGlobalOffset &offset)
Deserialize (read) the parallel array with MPI-aware metadata.
the host side operators are provided as implemented
int32_t rowsize
Row-width / per-row element-count type (signed 32-bit).
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).