docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
helper.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <unordered_map>
5
6#include "mlir/IR/AffineExpr.h"
7#include "mlir/IR/AffineMap.h"
8#include "mlir/IR/Types.h"
11#include "sdfg/types/type.h"
12
13namespace mlir {
14namespace sdfg {
15
16// SDFG index type depends on the bitwidth of the system
17#if INTPTR_MAX == INT64_MAX
18const ::sdfg::types::PrimitiveType sdfg_index_type = ::sdfg::types::PrimitiveType::Int64;
19#elif INTPTR_MAX == INT32_MAX
20const ::sdfg::types::PrimitiveType sdfg_index_type = ::sdfg::types::PrimitiveType::Int32;
21#elif INTPTR_MAX == INT16_MAX
22const ::sdfg::types::PrimitiveType sdfg_index_type = ::sdfg::types::PrimitiveType::Int16;
23#elif INTPTR_MAX == INT8_MAX
24const ::sdfg::types::PrimitiveType sdfg_index_type = ::sdfg::types::PrimitiveType::Int8;
25#else
26#error "Unsupported pointer size"
27#endif
28
29bool is_sdfg_primitive(Type type);
33
35 AffineExpr affine_expr,
36 const std::unordered_map<size_t, ::sdfg::symbolic::Symbol>& dimensions = {},
37 const std::unordered_map<size_t, ::sdfg::symbolic::Symbol>& symbols = {},
38 bool strict = false
39);
41 AffineMap affine_map, const ::sdfg::symbolic::SymbolVec& dimensions, const ::sdfg::symbolic::SymbolVec& symbols = {}
42);
43
44} // namespace sdfg
45} // namespace mlir
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
Edges in the dataflow graph representing data movement.
Definition ArithToSDFGTranslator.h:8
const ::sdfg::types::PrimitiveType sdfg_index_type
Definition helper.h:18
bool is_sdfg_primitive(Type type)
bool is_vector_or_tensor_of_sdfg_primitive(Type type)
bool is_vector_of_sdfg_primitive(Type type)
::sdfg::data_flow::Subset affine_map_to_subset(AffineMap affine_map, const ::sdfg::symbolic::SymbolVec &dimensions, const ::sdfg::symbolic::SymbolVec &symbols={})
::sdfg::symbolic::Expression affine_expr_to_symbolic_expr(AffineExpr affine_expr, const std::unordered_map< size_t, ::sdfg::symbolic::Symbol > &dimensions={}, const std::unordered_map< size_t, ::sdfg::symbolic::Symbol > &symbols={}, bool strict=false)
bool is_tensor_of_sdfg_primitive(Type type)
Definition CustomPasses.h:6
symbolic::MultiExpression Subset
Type alias for a subset specification (array of symbolic expressions).
Definition memlet.h:103
@ Int32
32-bit signed integer
Definition type.h:40
@ Int16
16-bit signed integer
Definition type.h:39
@ Int64
64-bit signed integer
Definition type.h:41
@ Int8
8-bit signed integer
Definition type.h:38
Symbolic system for integer-based symbol analysis.
Core type system definitions for sdfglib.