picceler
A compiled DSL for image processing, built on MLIR
Loading...
Searching...
No Matches
common.cpp File Reference
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Transforms/DialectConversion.h"
#include "ops.h"

Namespaces

namespace  picceler

Functions

mlir::Value picceler::createFloatConstant (mlir::OpBuilder &builder, mlir::Location loc, double value)
 Common utility function to create a constant float value in MLIR.
mlir::Value picceler::createIntConstant (mlir::OpBuilder &builder, mlir::Location loc, int64_t value)
 Common utility function to create a constant int value in MLIR.
mlir::affine::AffineParallelOp picceler::createAffineParallel (mlir::ConversionPatternRewriter &rewriter, mlir::Location loc, mlir::ValueRange upperBounds, mlir::TypeRange resultTypes={}, llvm::ArrayRef< mlir::arith::AtomicRMWKind > reductions={})
 Builds an affine.parallel band with one induction variable per entry in upperBounds, lower bound 0 and step 1. Upper bounds may be dynamic SSA values, not just compile-time constants. Pass resultTypes/reductions to get a reduction band whose body must end with a matching affine.yield; left empty, the trivial affine.yield terminator is inserted automatically.