MLIR 22.0.0git
Approximation.h
Go to the documentation of this file.
1//===- Approximation.h - Math dialect -----------------------------*- C++-*-==//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef MLIR_DIALECT_MATH_TRANSFORMS_APPROXIMATION_H
10#define MLIR_DIALECT_MATH_TRANSFORMS_APPROXIMATION_H
11
14
15namespace mlir {
16namespace math {
17
18struct ErfPolynomialApproximation : public OpRewritePattern<math::ErfOp> {
19public:
21
22 LogicalResult matchAndRewrite(math::ErfOp op,
23 PatternRewriter &rewriter) const final;
24};
25
26struct ErfcPolynomialApproximation : public OpRewritePattern<math::ErfcOp> {
27public:
29
30 LogicalResult matchAndRewrite(math::ErfcOp op,
31 PatternRewriter &rewriter) const final;
32};
33
34} // namespace math
35} // namespace mlir
36
37#endif // MLIR_DIALECT_MATH_TRANSFORMS_APPROXIMATION_H
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
Include the generated interface declarations.
OpRewritePattern(MLIRContext *context, PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={})
Patterns must specify the root operation name they match against, and can also specify the benefit of...
LogicalResult matchAndRewrite(math::ErfOp op, PatternRewriter &rewriter) const final
OpRewritePattern(MLIRContext *context, PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={})
Patterns must specify the root operation name they match against, and can also specify the benefit of...
LogicalResult matchAndRewrite(math::ErfcOp op, PatternRewriter &rewriter) const final
OpRewritePattern(MLIRContext *context, PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={})
Patterns must specify the root operation name they match against, and can also specify the benefit of...