MLIR  20.0.0git
Classes | Typedefs | Enumerations | Functions | Variables
mlir::sparse_tensor::ir_detail Namespace Reference

Classes

class  DimLvlExpr
 
class  DimExpr
 
class  LvlExpr
 
class  DimSpec
 The full dimVar = dimExpr : dimSlice specification for a given dimension. More...
 
class  LvlSpec
 The full lvlVar = lvlExpr : lvlType specification for a given level. More...
 
class  DimLvlMap
 
class  DimLvlMapParser
 Parses the Sparse Tensor Encoding Attribute (STEA). More...
 
class  LvlTypeParser
 
class  Var
 A concrete variable, to be used in our variant of AffineExpr. More...
 
class  SymVar
 
class  DimVar
 
class  LvlVar
 
class  Ranks
 
class  VarSet
 Efficient representation of a set of Var. More...
 
class  VarInfo
 A record of metadata for/about a variable, used by VarEnv. More...
 
class  VarEnv
 

Typedefs

template<typename T >
using has_print_method = decltype(std::declval< T >().print(std::declval< llvm::raw_ostream & >()))
 
template<typename T >
using detect_has_print_method = llvm::is_detected< has_print_method, T >
 
template<typename T , typename R = void>
using enable_if_has_print_method = std::enable_if_t< detect_has_print_method< T >::value, R >
 
template<typename T >
using VarKindArray = llvm::EnumeratedArray< T, VarKind, VarKind::Level >
 The type of arrays indexed by VarKind. More...
 

Enumerations

enum class  ExprKind : bool { Dimension = false , Level = true }
 
enum class  VarKind { Symbol = 1 , Dimension = 0 , Level = 2 }
 The three kinds of variables that Var can be. More...
 
enum class  Policy { MustNot , May , Must }
 

Functions

constexpr VarKind getVarKindAllowedInExpr (ExprKind ek)
 
template<typename T >
enable_if_has_print_method< T, llvm::raw_ostream & > operator<< (llvm::raw_ostream &os, T const &t)
 Generic template for defining operator<< overloads which delegate to T::print(raw_ostream&) const. More...
 
constexpr bool isWF (VarKind vk)
 
constexpr char toChar (VarKind vk)
 Gets the ASCII character used as the prefix when printing Var. More...
 

Variables

template<typename T >
static constexpr bool IsZeroCostAbstraction
 

Typedef Documentation

◆ detect_has_print_method

template<typename T >
using mlir::sparse_tensor::ir_detail::detect_has_print_method = typedef llvm::is_detected<has_print_method, T>

Definition at line 26 of file TemplateExtras.h.

◆ enable_if_has_print_method

template<typename T , typename R = void>
using mlir::sparse_tensor::ir_detail::enable_if_has_print_method = typedef std::enable_if_t<detect_has_print_method<T>::value, R>

Definition at line 28 of file TemplateExtras.h.

◆ has_print_method

template<typename T >
using mlir::sparse_tensor::ir_detail::has_print_method = typedef decltype(std::declval<T>().print(std::declval<llvm::raw_ostream &>()))

Definition at line 23 of file TemplateExtras.h.

◆ VarKindArray

template<typename T >
using mlir::sparse_tensor::ir_detail::VarKindArray = typedef llvm::EnumeratedArray<T, VarKind, VarKind::Level>

The type of arrays indexed by VarKind.

Definition at line 55 of file Var.h.

Enumeration Type Documentation

◆ ExprKind

Enumerator
Dimension 
Level 

Definition at line 22 of file DimLvlMap.h.

◆ Policy

Enumerator
MustNot 
May 
Must 

Definition at line 315 of file Var.h.

◆ VarKind

The three kinds of variables that Var can be.

NOTE: The numerical values used to represent this enum should be treated as an implementation detail, not as part of the API. In the API below we use the canonical ordering {Symbol,Dimension,Level} even though that does not agree with the numerical ordering of the numerical representation.

Enumerator
Symbol 
Dimension 
Level 

Definition at line 32 of file Var.h.

Function Documentation

◆ getVarKindAllowedInExpr()

constexpr VarKind mlir::sparse_tensor::ir_detail::getVarKindAllowedInExpr ( ExprKind  ek)
constexpr

◆ isWF()

constexpr bool mlir::sparse_tensor::ir_detail::isWF ( VarKind  vk)
constexpr

Definition at line 34 of file Var.h.

Referenced by mlir::sparse_tensor::ir_detail::Var::Impl::Impl().

◆ operator<<()

template<typename T >
enable_if_has_print_method<T, llvm::raw_ostream &> mlir::sparse_tensor::ir_detail::operator<< ( llvm::raw_ostream &  os,
T const &  t 
)
inline

Generic template for defining operator<< overloads which delegate to T::print(raw_ostream&) const.

Definition at line 1 of file TemplateExtras.h.

◆ toChar()

constexpr char mlir::sparse_tensor::ir_detail::toChar ( VarKind  vk)
constexpr

Gets the ASCII character used as the prefix when printing Var.

Definition at line 40 of file Var.h.

Referenced by mlir::sparse_tensor::ir_detail::Var::print().

Variable Documentation

◆ IsZeroCostAbstraction

template<typename T >
constexpr bool mlir::sparse_tensor::ir_detail::IsZeroCostAbstraction
staticconstexpr
Initial value:
=
std::is_trivially_copyable_v<T> && std::is_trivially_destructible_v<T> &&
std::is_standard_layout_v<T> &&
std::is_trivially_copy_constructible<T>::value &&
std::is_trivially_move_constructible<T>::value

Definition at line 42 of file TemplateExtras.h.