25namespace shamrock::solvergraph {
41 using IEdgeNamed::IEdgeNamed;
47 inline virtual void check_allocated(
const std::vector<u64> &ids)
const {
48 on_distributeddata_ids_diff(
53 "Missing buffer in distributed data at id " + std::to_string(
id));
58 "Extra buffer in distributed data at id " + std::to_string(
id));
63 inline virtual void ensure_allocated(
const std::vector<u64> &ids) {
65 auto new_buf = [&]() {
Header file describing a Node Instance.
std::uint64_t u64
64 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
Represents a collection of objects distributed across patches identified by a u64 id.
iterator add_obj(u64 id, T &&obj)
Adds a new object to the collection.
void erase(u64 id)
Removes an object from the collection.
Interface for a solver graph edge representing a field as spans.
virtual void free_alloc()
Free allocated memory.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
void on_distributeddata_ids_diff(const shambase::DistributedData< T1 > &dd, const std::vector< u64 > &ref_ids, FuncMatch &&func_missing, FuncMissing &&func_match, FuncExtra &&func_extra)
Compare two distributed data and apply callbacks based on the difference.