|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Functions | |
| template<typename SetType , typename PosType > | |
| axom::IndexType | map_storage_size (const SetType *set, PosType stride) |
| template<typename SetType , typename T , typename PosType > | |
| void | check_map_view_size (const SetType *set, PosType stride, const axom::ArrayView< T > &AXOM_DEBUG_PARAM(data)) |
| Debug-only check that an ArrayView backing a map is correctly sized. More... | |
| template<typename FromSet > | |
| axom::IndexType | relation_from_size (const FromSet *fromSet) |
| Number of from-set elements (null-safe). Reads only the set's size scalar. More... | |
| template<typename FromSet > | |
| void | check_variable_relation_size (const FromSet *fromSet, axom::IndexType AXOM_DEBUG_PARAM(beginsSize)) |
| Debug-only check that the begins array backing a variable-cardinality relation is correctly sized. More... | |
| template<typename FromSet , typename PosType > | |
| void | check_constant_relation_size (const FromSet *fromSet, PosType AXOM_DEBUG_PARAM(stride), axom::IndexType AXOM_DEBUG_PARAM(indicesSize)) |
| Debug-only check that the indices array backing a constant-cardinality relation (with stride stride) is correctly sized. More... | |
| axom::IndexType axom::slam::detail::map_storage_size | ( | const SetType * | set, |
| PosType | stride | ||
| ) |
|
inline |
Debug-only check that an ArrayView backing a map is correctly sized.
An ArrayView-backed map indexes through pos * stride + offset, so the backing storage must contain exactly set->size() * stride elements. Unlike the raw-pointer make_map overloads (which size the view themselves), the ArrayView overloads trust the caller's view length; an undersized view would index out of bounds. This asserts the invariant in debug builds and is a no-op in release builds.
References AXOM_UNUSED_VAR, map_storage_size(), and SLIC_ASSERT_MSG.
|
inline |
Number of from-set elements (null-safe). Reads only the set's size scalar.
|
inline |
Debug-only check that the begins array backing a variable-cardinality relation is correctly sized.
A variable relation stores one begin offset per from-set element plus a terminal, so begins must contain exactly fromSet->size() + 1 entries. A shorter begins array leads to out-of-bounds row traversal. This check inspects only sizes, so it is safe for relations built over device-resident storage. Deeper validity (e.g. monotonicity of begins and the terminal offset relative to the index count) is left to StaticRelation::isValid(), which reads the buffers on the appropriate memory space. Asserts in debug builds; a no-op in release builds.
References AXOM_UNUSED_VAR, relation_from_size(), and SLIC_ASSERT_MSG.
|
inline |
Debug-only check that the indices array backing a constant-cardinality relation (with stride stride) is correctly sized.
A constant-cardinality relation indexes through pos * stride, so indices must contain exactly fromSet->size() * stride entries. This check inspects only sizes, so it is safe for device-resident storage. Asserts in debug builds; a no-op in release builds.
References AXOM_UNUSED_VAR, relation_from_size(), and SLIC_ASSERT_MSG.