Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
DeviceBufferEdge.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
18
22
23namespace shamrock::solvergraph {
24
25 template<class T>
26 class DeviceBufferEdge : public IEdgeNamed {
27
28 public:
30
31 DeviceBufferEdge(std::string name, std::string texsymbol)
32 : IEdgeNamed(std::move(name), std::move(texsymbol)),
33 value(0, shamsys::instance::get_compute_scheduler_ptr()) {}
34
35 inline virtual void free_alloc() override { value.resize(0); }
36 };
37
38} // namespace shamrock::solvergraph
Header file describing a Node Instance.
A buffer allocated in USM (Unified Shared Memory).
virtual void free_alloc() override
Free allocated memory.