MLIR  15.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::sparse_tensor::TensorExp Struct Reference

Tensor expression. Represents a MLIR expression in tensor index notation. More...

#include "mlir/Dialect/SparseTensor/Utils/Merger.h"

+ Collaboration diagram for mlir::sparse_tensor::TensorExp:

Public Member Functions

 TensorExp (Kind k, unsigned x, unsigned y, Value v, Operation *operation)
 

Public Attributes

Kind kind
 Tensor expression kind. More...
 
union {
   unsigned   tensor
 Expressions representing tensors simply have a tensor number. More...
 
   unsigned   index
 Indices hold the index number. More...
 
   Children   children
 Tensor operations hold the indices of their children. More...
 
}; 
 
Value val
 Direct link to IR for an invariant or the destination value (to infer destination type) of a cast operation During code generation, this field may be used to cache "hoisted" loop invariant tensor loads. More...
 
Operationop
 Code blocks used by semirings. More...
 

Detailed Description

Tensor expression. Represents a MLIR expression in tensor index notation.

Definition at line 92 of file Merger.h.

Constructor & Destructor Documentation

◆ TensorExp()

mlir::sparse_tensor::TensorExp::TensorExp ( Kind  k,
unsigned  x,
unsigned  y,
Value  v,
Operation operation 
)

Definition at line 25 of file Merger.cpp.

Member Data Documentation

◆ @3

union { ... }

◆ children

Children mlir::sparse_tensor::TensorExp::children

Tensor operations hold the indices of their children.

Definition at line 106 of file Merger.h.

Referenced by genExp().

◆ index

unsigned mlir::sparse_tensor::TensorExp::index

Indices hold the index number.

Definition at line 103 of file Merger.h.

Referenced by genIndexValue().

◆ kind

Kind mlir::sparse_tensor::TensorExp::kind

Tensor expression kind.

Definition at line 96 of file Merger.h.

Referenced by genExp(), and genInvariants().

◆ op

Operation* mlir::sparse_tensor::TensorExp::op

Code blocks used by semirings.

For the case of kUnary and kBinary, this holds the original operation with all regions. For kBinaryBranch, this holds the YieldOp for the left or right half to be merged into a nested scf loop.

Definition at line 118 of file Merger.h.

◆ tensor

unsigned mlir::sparse_tensor::TensorExp::tensor

Expressions representing tensors simply have a tensor number.

Definition at line 100 of file Merger.h.

Referenced by genInvariants(), and genTensorLoad().

◆ val

Value mlir::sparse_tensor::TensorExp::val

Direct link to IR for an invariant or the destination value (to infer destination type) of a cast operation During code generation, this field may be used to cache "hoisted" loop invariant tensor loads.

Definition at line 112 of file Merger.h.

Referenced by genInvariantValue(), genTensorLoad(), and updateReduc().


The documentation for this struct was generated from the following files: