![]() |
HydroCouple
2.0.0-alpha.1
HydroCouple Interface Definitions
|
Non-normative convenience helpers for the HydroCouple interface standard. More...
#include "hydrocouple.h"Go to the source code of this file.
Classes | |
| struct | HydroCouple::Helpers::DataKindOf< T > |
| DataKindOf maps a C++ type to its DataKind at compile time. More... | |
| struct | HydroCouple::Helpers::DataKindOf< int8_t > |
| struct | HydroCouple::Helpers::DataKindOf< uint8_t > |
| struct | HydroCouple::Helpers::DataKindOf< int16_t > |
| struct | HydroCouple::Helpers::DataKindOf< uint16_t > |
| struct | HydroCouple::Helpers::DataKindOf< int32_t > |
| struct | HydroCouple::Helpers::DataKindOf< uint32_t > |
| struct | HydroCouple::Helpers::DataKindOf< int64_t > |
| struct | HydroCouple::Helpers::DataKindOf< uint64_t > |
| struct | HydroCouple::Helpers::DataKindOf< float > |
| struct | HydroCouple::Helpers::DataKindOf< double > |
| struct | HydroCouple::Helpers::DataKindOf< bool > |
| struct | HydroCouple::Helpers::DataKindOf< std::string > |
Namespaces | |
| namespace | HydroCouple |
| HydroCouple namespace contains the core interface specifications for the HydroCouple component-based modeling framework interface specification. | |
| namespace | HydroCouple::Helpers |
| Non-normative convenience helpers for the HydroCouple interface standard. | |
Functions | |
| constexpr int64_t | HydroCouple::Helpers::dataKindSize (DataKind kind) |
| Size in bytes of one element of the given DataKind. | |
| constexpr int64_t | HydroCouple::Helpers::elementCount (const BufferDescriptor &d) |
| Number of elements a BufferDescriptor describes (product of shape; 1 for rank 0). | |
| constexpr bool | HydroCouple::Helpers::isContiguous (const BufferDescriptor &d) |
| Checks whether a BufferDescriptor's layout is C-contiguous (row-major, packed). | |
| constexpr int64_t | HydroCouple::Helpers::byteOffset (const BufferDescriptor &d, std::span< const int64_t > index) |
| Byte offset from a descriptor's base address of the element at the given index. | |
| constexpr int64_t | HydroCouple::Helpers::contiguousByteSize (const BufferDescriptor &d) |
| Total byte extent of a C-contiguous buffer of the descriptor's shape and kind. | |
| constexpr BufferDescriptor | HydroCouple::Helpers::makeContiguous (void *data, DataKind kind, std::span< const int64_t > shape) |
| Builds a C-contiguous host BufferDescriptor. | |
| constexpr bool | HydroCouple::Helpers::isValidComponentStatusTransition (IModelComponent::ComponentStatus from, IModelComponent::ComponentStatus to) |
| Encodes the normative component lifecycle state machine. | |
| template<typename T> | |
| bool | HydroCouple::Helpers::getValue (const IComponentDataItem &item, T &value, std::span< const int64_t > index) |
| Typed convenience: reads the single element at the given index of a data item. | |
| template<typename T> | |
| bool | HydroCouple::Helpers::setValue (IComponentDataItem &item, const T &value, std::span< const int64_t > index) |
| Typed convenience: writes the single element at the given index of a data item. | |
| template<typename T> | |
| bool | HydroCouple::Helpers::getValues (const IComponentDataItem &item, std::span< T > destination, std::span< const int64_t > start, std::span< const int64_t > count) |
| Typed convenience: reads a hyperslab into a flat contiguous span in C order. | |
| template<typename T> | |
| bool | HydroCouple::Helpers::setValues (IComponentDataItem &item, std::span< const T > source, std::span< const int64_t > start, std::span< const int64_t > count) |
| Typed convenience: writes a hyperslab from a flat contiguous span in C order. | |
Non-normative convenience helpers for the HydroCouple interface standard.
This header is the single deliberate exception to the standard's no-implementation rule: the interface headers (hydrocouple.h and companions) contain only pure declarations, enums, and plain aggregates, while the small executable conveniences that nearly every implementer and consumer would otherwise rewrite — DataKind metadata, BufferDescriptor arithmetic, the lifecycle transition table, and typed wrappers over the hyperslab API — live here. Nothing in this header is required to implement or consume the standard; it may be ignored entirely.