docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
rocm_stdlib_data_transfer_extraction.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json_fwd.hpp>
4#include <string>
5
15#include "sdfg/types/pointer.h"
16
17namespace sdfg {
18namespace rocm {
19
21private:
22 data_flow::LibraryNode& lib_node_;
23
24 std::string create_device_container(
26 );
27
28 void create_allocate(
32 const std::string& device_container,
33 const symbolic::Expression& size,
34 const types::Pointer& type
35 );
36 void create_deallocate(
40 const std::string& device_container,
41 const types::Pointer& type
42 );
43
44 void create_copy_from_device_with_deallocation(
48 const std::string& host_container,
49 const std::string& device_container,
50 const symbolic::Expression& size,
51 const types::Pointer& type
52 );
53
54 void create_copy_to_device_with_allocation(
58 const std::string& host_container,
59 const std::string& device_container,
60 const symbolic::Expression& size,
61 const types::Pointer& type
62 );
63
64 void apply_memset(
66 analysis::AnalysisManager& analysis_manager,
70 );
71
72 void apply_memcpy(
74 analysis::AnalysisManager& analysis_manager,
78 );
79
80public:
82
83 virtual std::string name() const override;
84
85 virtual bool
87
88 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
89
90 virtual void to_json(nlohmann::json& json) const override;
91};
92
93} // namespace rocm
94} // namespace sdfg
Definition analysis.h:53
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Definition data_flow_graph.h:29
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
ROCMStdlibDataTransferExtraction(data_flow::LibraryNode &lib_node)
virtual bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
virtual void to_json(nlohmann::json &json) const override
Serialize this transformation to JSON.
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
virtual std::string name() const override
Get the name of this transformation.
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for all SDFG transformations.
Definition transformation.h:25
Represents a pointer type.
Definition pointer.h:32
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
nlohmann::json json
Definition interstate_edge.h:14
Library node definitions for calling functions beyond simple instructions.
Definition function_builder.h:10
Definition rocm_library_node_rewriter_pass.h:9
Definition analysis.h:7
Pointer type representation.
Symbolic system for integer-based symbol analysis.