include "mlir/Interfaces/VectorInterfaces.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
-class MathOp<string mnemonic, list<OpTrait> traits = []>
+class Math_Op<string mnemonic, list<OpTrait> traits = []>
: Op<Math_Dialect, mnemonic, traits # [NoSideEffect]>;
-class FloatUnaryOp<string mnemonic, list<OpTrait> traits = []> :
- MathOp<mnemonic, traits #
+class Math_FloatUnaryOp<string mnemonic, list<OpTrait> traits = []> :
+ Math_Op<mnemonic, traits #
[DeclareOpInterfaceMethods<VectorUnrollOpInterface>,
SameOperandsAndResultType] # ElementwiseMappable.traits> {
let arguments = (ins FloatLike:$operand);
let assemblyFormat = "$operand attr-dict `:` type($result)";
}
-class FloatBinaryOp<string mnemonic, list<OpTrait> traits = []> :
- MathOp<mnemonic, traits # [
+class Math_FloatBinaryOp<string mnemonic, list<OpTrait> traits = []> :
+ Math_Op<mnemonic, traits # [
DeclareOpInterfaceMethods<VectorUnrollOpInterface>,
SameOperandsAndResultType] # ElementwiseMappable.traits> {
let arguments = (ins FloatLike:$lhs, FloatLike:$rhs);
// AtanOp
//===----------------------------------------------------------------------===//
-def AtanOp : FloatUnaryOp<"atan">{
+def Math_AtanOp : Math_FloatUnaryOp<"atan">{
let summary = "arcus tangent of the given value";
let description = [{
Syntax:
// Atan2Op
//===----------------------------------------------------------------------===//
-def Atan2Op : FloatBinaryOp<"atan2">{
+def Math_Atan2Op : Math_FloatBinaryOp<"atan2">{
let summary = "2-argument arcus tangent of the given values";
let description = [{
Syntax:
// CosOp
//===----------------------------------------------------------------------===//
-def CosOp : FloatUnaryOp<"cos"> {
+def Math_CosOp : Math_FloatUnaryOp<"cos"> {
let summary = "cosine of the specified value";
let description = [{
Syntax:
// SinOp
//===----------------------------------------------------------------------===//
-def SinOp : FloatUnaryOp<"sin"> {
+def Math_SinOp : Math_FloatUnaryOp<"sin"> {
let summary = "sine of the specified value";
let description = [{
Syntax:
// ExpOp
//===----------------------------------------------------------------------===//
-def ExpOp : FloatUnaryOp<"exp"> {
+def Math_ExpOp : Math_FloatUnaryOp<"exp"> {
let summary = "base-e exponential of the specified value";
let description = [{
Syntax:
// Exp2Op
//===----------------------------------------------------------------------===//
-def Exp2Op : FloatUnaryOp<"exp2"> {
+def Math_Exp2Op : Math_FloatUnaryOp<"exp2"> {
let summary = "base-2 exponential of the specified value";
let description = [{
// ExpM1Op
//===----------------------------------------------------------------------===//
-def ExpM1Op : FloatUnaryOp<"expm1"> {
+def Math_ExpM1Op : Math_FloatUnaryOp<"expm1"> {
let summary = "base-e exponential of the specified value minus 1";
let description = [{
Syntax:
// LogOp
//===----------------------------------------------------------------------===//
-def LogOp : FloatUnaryOp<"log"> {
+def Math_LogOp : Math_FloatUnaryOp<"log"> {
let summary = "base-e logarithm of the specified value";
let description = [{
// Log10Op
//===----------------------------------------------------------------------===//
-def Log10Op : FloatUnaryOp<"log10"> {
+def Math_Log10Op : Math_FloatUnaryOp<"log10"> {
let summary = "base-10 logarithm of the specified value";
let description = [{
// Log1pOp
//===----------------------------------------------------------------------===//
-def Log1pOp : FloatUnaryOp<"log1p"> {
+def Math_Log1pOp : Math_FloatUnaryOp<"log1p"> {
let summary = "Computes the natural logarithm of one plus the given value";
let description = [{
// Log2Op
//===----------------------------------------------------------------------===//
-def Log2Op : FloatUnaryOp<"log2"> {
+def Math_Log2Op : Math_FloatUnaryOp<"log2"> {
let summary = "base-2 logarithm of the specified value";
let description = [{
// PowFOp
//===----------------------------------------------------------------------===//
-def PowFOp : FloatBinaryOp<"powf"> {
+def Math_PowFOp : Math_FloatBinaryOp<"powf"> {
let summary = "floating point raised to the power of operation";
let description = [{
Syntax:
// RsqrtOp
//===----------------------------------------------------------------------===//
-def RsqrtOp : FloatUnaryOp<"rsqrt"> {
+def Math_RsqrtOp : Math_FloatUnaryOp<"rsqrt"> {
let summary = "reciprocal of sqrt (1 / sqrt of the specified value)";
let description = [{
The `rsqrt` operation computes the reciprocal of the square root. It takes
// SqrtOp
//===----------------------------------------------------------------------===//
-def SqrtOp : FloatUnaryOp<"sqrt"> {
+def Math_SqrtOp : Math_FloatUnaryOp<"sqrt"> {
let summary = "sqrt of the specified value";
let description = [{
The `sqrt` operation computes the square root. It takes one operand and
// TanhOp
//===----------------------------------------------------------------------===//
-def TanhOp : FloatUnaryOp<"tanh"> {
+def Math_TanhOp : Math_FloatUnaryOp<"tanh"> {
let summary = "hyperbolic tangent of the specified value";
let description = [{
Syntax: