2#include <muda/graph/graph_base.h>
6#ifdef MUDA_WITH_GRAPH_MEMORY_ALLOC_FREE
7class MemAllocNode :
public GraphNode
12 using this_type = MemAllocNode;
17class MemAllocNodeParms :
public NodeParms
19 cudaMemAllocNodeParams m_parms;
22 using this_type = MemAllocNodeParms;
24 friend class std::shared_ptr<this_type>;
25 friend class std::unique_ptr<this_type>;
26 friend class std::weak_ptr<this_type>;
28 MemAllocNodeParms(
size_t size)
31 m_parms.poolProps.allocType = cudaMemAllocationTypePinned;
32 cudaGetDevice(&m_parms.poolProps.location.id);
33 m_parms.poolProps.location.type = cudaMemLocationTypeDevice;
34 m_parms.bytesize = size *
sizeof(T);
37 cudaMemAllocNodeParams* getRaw() {
return &m_parms; }
38 const cudaMemAllocNodeParams* getRaw()
const {
return &m_parms; }
41class MemFreeNode :
public GraphNode
44 using this_type = MemFreeNode;
Definition graph_base.h:27
Definition memory_node.h:50
Definition memory_node.h:57