specfem::datatype::impl::RegisterArray¶
-
template<typename T, typename Extents, typename Layout>
class RegisterArray¶ Stack-allocated multi-dimensional array with compile-time layout.
High-performance register array for small, fixed-size data with specified memory layout.
- Template Parameters:
T – Base data type of the array elements
Extents – Array dimensions and sizes
Layout – Memory layout specification
Subclassed by specfem::datatype::VectorPointViewType< type_real, num_dimensions, UseSIMD >, specfem::datatype::VectorPointViewType< type_real, NQuadIntersection, false >
Public Functions
-
inline RegisterArray(const value_type value)¶
Construct array filled with single value.
- Parameters:
value – Fill value for all elements
-
template<typename ...Args, typename std::enable_if<sizeof...(Args) == size, bool>::type = true>
inline RegisterArray(const Args&... args)¶ Construct from individual element values.
- Template Parameters:
Args – Argument types (must match array size)
- Parameters:
args – Element values in linear order
-
inline RegisterArray(const RegisterArray &other)¶
Copy constructor.
- Parameters:
other – Array to copy from
-
inline RegisterArray()¶
Default constructor (zero-initialized)
-
inline RegisterArray(const T *values)¶
Construct from C-style array.
- Parameters:
values – Pointer to array data (must have at least ‘size’ elements)
-
template<typename ...IndexType>
inline constexpr value_type &operator()(const IndexType&... i)¶ Multi-dimensional element access (non-const)
- Template Parameters:
IndexType – Variadic index types
- Parameters:
i – Multi-dimensional indices
- Returns:
Reference to element
-
template<typename ...IndexType>
inline constexpr const value_type &operator()(const IndexType&... i) const¶ Multi-dimensional element access (const)
- Template Parameters:
IndexType – Variadic index types
- Parameters:
i – Multi-dimensional indices
- Returns:
Const reference to element
-
template<typename U = T, std::enable_if_t<std::is_integral<U>::value, int> = 0>
inline bool operator==(const RegisterArray &other) const¶ Equality comparison for integral types.
- Parameters:
other – Array to compare with
- Returns:
True if arrays are equal
-
inline bool operator!=(const RegisterArray &other) const¶
Inequality comparison.
- Parameters:
other – Array to compare with
- Returns:
True if arrays are not equal
Private Types