My Project
Public Member Functions | List of all members
mlir::edsc::AffineLoopNestBuilder Class Reference

#include <Builders.h>

Public Member Functions

 AffineLoopNestBuilder (ValueHandle *iv, ArrayRef< ValueHandle > lbs, ArrayRef< ValueHandle > ubs, int64_t step)
 
 AffineLoopNestBuilder (ArrayRef< ValueHandle *> ivs, ArrayRef< ValueHandle > lbs, ArrayRef< ValueHandle > ubs, ArrayRef< int64_t > steps)
 
void operator() (function_ref< void(void)> fun=nullptr)
 

Detailed Description

Explicit nested LoopBuilder. Offers a compressed multi-loop builder to avoid explicitly writing all the loops in a nest. This simple functionality is also useful to write rank-agnostic custom ops.

Usage:

{c++}
AffineLoopNestBuilder({&i, &j, &k}, {lb, lb, lb}, {ub, ub, ub}, {1, 1,
1})(
[&](){
...
});
{c++}
AffineLoopNestBuilder({&i}, {lb}, {ub}, {1})([&](){
AffineLoopNestBuilder({&j}, {lb}, {ub}, {1})([&](){
AffineLoopNestBuilder({&k}, {lb}, {ub}, {1})([&](){
...
}),
}),
});

Constructor & Destructor Documentation

◆ AffineLoopNestBuilder() [1/2]

mlir::edsc::AffineLoopNestBuilder::AffineLoopNestBuilder ( ValueHandle iv,
ArrayRef< ValueHandle lbs,
ArrayRef< ValueHandle ubs,
int64_t  step 
)

◆ AffineLoopNestBuilder() [2/2]

mlir::edsc::AffineLoopNestBuilder::AffineLoopNestBuilder ( ArrayRef< ValueHandle *>  ivs,
ArrayRef< ValueHandle lbs,
ArrayRef< ValueHandle ubs,
ArrayRef< int64_t >  steps 
)

Member Function Documentation

◆ operator()()

void mlir::edsc::AffineLoopNestBuilder::operator() ( function_ref< void(void)>  fun = nullptr)

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