docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
rocm_language_extension.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
8#include "sdfg/types/type.h"
9
10namespace sdfg::rocm {
11
13 const gpu::rocm::RocmArch* arch_;
14
15public:
17 sdfg::Function& function, const gpu::rocm::RocmArch* arch, const std::string& external_prefix = ""
18 )
19 : CStyleLanguageExtension(function, external_prefix), arch_(arch) {
20 }
21
22 ROCMLanguageExtension(sdfg::Function& function, const std::string& external_prefix = "")
23 : ROCMLanguageExtension(function, nullptr, external_prefix) {
24 }
25
26 const std::string language() const override {
27 return "ROCM";
28 }
29
31 return arch_;
32 }
33
34 std::string primitive_type(const types::PrimitiveType prim_type) override;
35
36 std::string declaration(
37 const std::string& name, const types::IType& type, bool use_initializer = false, bool use_alignment = false
38 ) override;
39
40 std::string type_cast(const std::string& name, const types::IType& type) override;
41
42 std::string subset(const types::IType& type, const data_flow::Subset& subset) override;
43
44 std::string expression(const symbolic::Expression expr) override;
45
46 std::string access_node(const data_flow::AccessNode& node) override;
47
48 std::string tasklet(const data_flow::Tasklet& tasklet) override;
49
50 std::string zero(const types::PrimitiveType prim_type) override;
51};
52
53} // namespace sdfg::rocm
Definition function.h:43
Statement and control-flow syntax shared by the C family (C, C++, CUDA, HIP).
Definition c_style_language_extension.h:9
const std::string & external_prefix() const
Definition language_extension.h:51
Node representing access to a data container in the dataflow graph.
Definition access_node.h:84
Simple computational operation in the dataflow graph.
Definition tasklet.h:348
Definition rocm_arch.h:116
const gpu::rocm::RocmArch * gpu_arch() const
Definition rocm_language_extension.h:30
std::string type_cast(const std::string &name, const types::IType &type) override
std::string primitive_type(const types::PrimitiveType prim_type) override
const std::string language() const override
Definition rocm_language_extension.h:26
ROCMLanguageExtension(sdfg::Function &function, const gpu::rocm::RocmArch *arch, const std::string &external_prefix="")
Definition rocm_language_extension.h:16
std::string subset(const types::IType &type, const data_flow::Subset &subset) override
std::string access_node(const data_flow::AccessNode &node) override
std::string tasklet(const data_flow::Tasklet &tasklet) override
std::string expression(const symbolic::Expression expr) override
ROCMLanguageExtension(sdfg::Function &function, const std::string &external_prefix="")
Definition rocm_language_extension.h:22
std::string declaration(const std::string &name, const types::IType &type, bool use_initializer=false, bool use_alignment=false) override
std::string zero(const types::PrimitiveType prim_type) override
Abstract base interface for all types in the sdfglib type system.
Definition type.h:625
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
symbolic::MultiExpression Subset
Type alias for a subset specification (array of symbolic expressions).
Definition memlet.h:103
Definition rocm_library_node_rewriter_pass.h:9
PrimitiveType
Enumeration of all primitive data types supported by sdfglib.
Definition type.h:35
Symbolic system for integer-based symbol analysis.
Core type system definitions for sdfglib.