'complex' Dialect
The complex dialect is intended to hold complex numbers creation and arithmetic ops.
Operations ¶
complex.abs
(complex::AbsOp) ¶
Computes absolute value of a complex number
Syntax:
operation ::= `complex.abs` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The abs
op takes a single complex number and computes its absolute value.
Example:
%a = complex.abs %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | floating-point |
complex.add
(complex::AddOp) ¶
Complex addition
Syntax:
operation ::= `complex.add` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
The add
operation takes two complex numbers and returns their sum.
Example:
%a = complex.add %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.angle
(complex::AngleOp) ¶
Computes argument value of a complex number
Syntax:
operation ::= `complex.angle` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The angle
op takes a single complex number and computes its argument value with a branch cut along the negative real axis.
Example:
%a = complex.angle %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | floating-point |
complex.atan2
(complex::Atan2Op) ¶
Complex 2-argument arctangent
Syntax:
operation ::= `complex.atan2` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
For complex numbers it is expressed using complex logarithm atan2(y, x) = -i * log((x + i * y) / sqrt(x2 + y2))
Example:
%a = complex.atan2 %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.bitcast
(complex::BitcastOp) ¶
Computes bitcast between complex and equal arith types
Syntax:
operation ::= `complex.bitcast` $operand attr-dict `:` type($operand) `to` type($result)
Example:
%a = complex.bitcast %b : complex<f32> -> i64
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
operand | any type |
Results: ¶
Result | Description |
---|---|
result | any type |
complex.conj
(complex::ConjOp) ¶
Calculate the complex conjugate
Syntax:
operation ::= `complex.conj` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The conj
op takes a single complex number and computes the
complex conjugate.
Example:
%a = complex.conj %b: complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.constant
(complex::ConstantOp) ¶
Complex number constant operation
Syntax:
operation ::= `complex.constant` $value attr-dict `:` type($complex)
The complex.constant
operation creates a constant complex number from an
attribute containing the real and imaginary parts.
Example:
%a = complex.constant [0.1, -1.0] : complex<f64>
Traits: AlwaysSpeculatableImplTrait
, ConstantLike
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
, OpAsmOpInterface
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
value | ::mlir::ArrayAttr | array attribute |
Results: ¶
Result | Description |
---|---|
complex | complex-type |
complex.cos
(complex::CosOp) ¶
Computes cosine of a complex number
Syntax:
operation ::= `complex.cos` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The cos
op takes a single complex number and computes the cosine of
it, i.e. cos(x)
, where x
is the input value.
Example:
%a = complex.cos %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.create
(complex::CreateOp) ¶
Complex number creation operation
Syntax:
operation ::= `complex.create` $real `,` $imaginary attr-dict `:` type($complex)
The complex.create
operation creates a complex number from two
floating-point operands, the real and the imaginary part.
Example:
%a = complex.create %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
real | floating-point |
imaginary | floating-point |
Results: ¶
Result | Description |
---|---|
complex | complex type with floating-point elements |
complex.div
(complex::DivOp) ¶
Complex division
Syntax:
operation ::= `complex.div` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
The div
operation takes two complex numbers and returns result of their
division:
%a = complex.div %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.eq
(complex::EqualOp) ¶
Computes whether two complex values are equal
Syntax:
operation ::= `complex.eq` $lhs `,` $rhs attr-dict `:` type($lhs)
The eq
op takes two complex numbers and returns whether they are equal.
Example:
%a = complex.eq %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | 1-bit signless integer |
complex.exp
(complex::ExpOp) ¶
Computes exponential of a complex number
Syntax:
operation ::= `complex.exp` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The exp
op takes a single complex number and computes the exponential of
it, i.e. exp(x)
or e^(x)
, where x
is the input value.
e
denotes Euler’s number and is approximately equal to 2.718281.
Example:
%a = complex.exp %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.expm1
(complex::Expm1Op) ¶
Computes exponential of a complex number minus 1
Syntax:
operation ::= `complex.expm1` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
complex.expm1(x) := complex.exp(x) - 1
Example:
%a = complex.expm1 %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.im
(complex::ImOp) ¶
Extracts the imaginary part of a complex number
Syntax:
operation ::= `complex.im` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The im
op takes a single complex number and extracts the imaginary part.
Example:
%a = complex.im %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
imaginary | floating-point |
complex.log
(complex::LogOp) ¶
Computes natural logarithm of a complex number
Syntax:
operation ::= `complex.log` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The log
op takes a single complex number and computes the natural
logarithm of it, i.e. log(x)
or log_e(x)
, where x
is the input value.
e
denotes Euler’s number and is approximately equal to 2.718281.
Example:
%a = complex.log %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.log1p
(complex::Log1pOp) ¶
Computes natural logarithm of a complex number
Syntax:
operation ::= `complex.log1p` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The log
op takes a single complex number and computes the natural
logarithm of one plus the given value, i.e. log(1 + x)
or log_e(1 + x)
,
where x
is the input value. e
denotes Euler’s number and is
approximately equal to 2.718281.
Example:
%a = complex.log1p %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.mul
(complex::MulOp) ¶
Complex multiplication
Syntax:
operation ::= `complex.mul` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
The mul
operation takes two complex numbers and returns their product:
%a = complex.mul %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.neg
(complex::NegOp) ¶
Negation operator
Syntax:
operation ::= `complex.neg` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The neg
op takes a single complex number complex
and returns -complex
.
Example:
%a = complex.neg %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.neq
(complex::NotEqualOp) ¶
Computes whether two complex values are not equal
Syntax:
operation ::= `complex.neq` $lhs `,` $rhs attr-dict `:` type($lhs)
The neq
op takes two complex numbers and returns whether they are not
equal.
Example:
%a = complex.neq %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | 1-bit signless integer |
complex.pow
(complex::PowOp) ¶
Complex power function
Syntax:
operation ::= `complex.pow` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
The sqrt
operation takes a complex number raises it to the given complex
exponent.
Example:
%a = complex.pow %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.re
(complex::ReOp) ¶
Extracts the real part of a complex number
Syntax:
operation ::= `complex.re` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The re
op takes a single complex number and extracts the real part.
Example:
%a = complex.re %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
real | floating-point |
complex.rsqrt
(complex::RsqrtOp) ¶
Complex reciprocal of square root
Syntax:
operation ::= `complex.rsqrt` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The rsqrt
operation computes reciprocal of square root.
Example:
%a = complex.rsqrt %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.sign
(complex::SignOp) ¶
Computes sign of a complex number
Syntax:
operation ::= `complex.sign` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The sign
op takes a single complex number and computes the sign of
it, i.e. y = sign(x) = x / |x|
if x != 0
, otherwise y = 0
.
Example:
%a = complex.sign %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.sin
(complex::SinOp) ¶
Computes sine of a complex number
Syntax:
operation ::= `complex.sin` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The sin
op takes a single complex number and computes the sine of
it, i.e. sin(x)
, where x
is the input value.
Example:
%a = complex.sin %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.sqrt
(complex::SqrtOp) ¶
Complex square root
Syntax:
operation ::= `complex.sqrt` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The sqrt
operation takes a complex number and returns its square root.
Example:
%a = complex.sqrt %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.sub
(complex::SubOp) ¶
Complex subtraction
Syntax:
operation ::= `complex.sub` $lhs `,` $rhs (`fastmath` `` $fastmath^)? attr-dict `:` type($result)
The sub
operation takes two complex numbers and returns their difference.
Example:
%a = complex.sub %b, %c : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
lhs | complex type with floating-point elements |
rhs | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.tan
(complex::TanOp) ¶
Computes tangent of a complex number
Syntax:
operation ::= `complex.tan` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The tan
op takes a single complex number and computes the tangent of
it, i.e. tan(x)
, where x
is the input value.
Example:
%a = complex.tan %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
complex.tanh
(complex::TanhOp) ¶
Complex hyperbolic tangent
Syntax:
operation ::= `complex.tanh` $complex (`fastmath` `` $fastmath^)? attr-dict `:` type($complex)
The tanh
operation takes a complex number and returns its hyperbolic
tangent.
Example:
%a = complex.tanh %b : complex<f32>
Traits: AlwaysSpeculatableImplTrait
, Elementwise
, SameOperandsAndResultType
Interfaces: ArithFastMathInterface
, ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
fastmath | ::mlir::arith::FastMathFlagsAttr | Floating point fast math flagsEnum cases:
|
Operands: ¶
Operand | Description |
---|---|
complex | complex type with floating-point elements |
Results: ¶
Result | Description |
---|---|
result | complex type with floating-point elements |
Enums ¶
CmpFPredicate ¶
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Cases: ¶
Symbol | Value | String |
---|---|---|
AlwaysFalse | 0 | false |
OEQ | 1 | oeq |
OGT | 2 | ogt |
OGE | 3 | oge |
OLT | 4 | olt |
OLE | 5 | ole |
ONE | 6 | one |
ORD | 7 | ord |
UEQ | 8 | ueq |
UGT | 9 | ugt |
UGE | 10 | uge |
ULT | 11 | ult |
ULE | 12 | ule |
UNE | 13 | une |
UNO | 14 | uno |
AlwaysTrue | 15 | true |
CmpIPredicate ¶
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Cases: ¶
Symbol | Value | String |
---|---|---|
eq | 0 | eq |
ne | 1 | ne |
slt | 2 | slt |
sle | 3 | sle |
sgt | 4 | sgt |
sge | 5 | sge |
ult | 6 | ult |
ule | 7 | ule |
ugt | 8 | ugt |
uge | 9 | uge |
IntegerOverflowFlags ¶
Integer overflow arith flags
Cases: ¶
Symbol | Value | String |
---|---|---|
none | 0 | none |
nsw | 1 | nsw |
nuw | 2 | nuw |
RoundingMode ¶
Floating point rounding mode
Cases: ¶
Symbol | Value | String |
---|---|---|
to_nearest_even | 0 | to_nearest_even |
downward | 1 | downward |
upward | 2 | upward |
toward_zero | 3 | toward_zero |
to_nearest_away | 4 | to_nearest_away |
AtomicRMWKind ¶
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
Cases: ¶
Symbol | Value | String |
---|---|---|
addf | 0 | addf |
addi | 1 | addi |
assign | 2 | assign |
maximumf | 3 | maximumf |
maxs | 4 | maxs |
maxu | 5 | maxu |
minimumf | 6 | minimumf |
mins | 7 | mins |
minu | 8 | minu |
mulf | 9 | mulf |
muli | 10 | muli |
ori | 11 | ori |
andi | 12 | andi |
maxnumf | 13 | maxnumf |
minnumf | 14 | minnumf |
FastMathFlags ¶
Floating point fast math flags
Cases: ¶
Symbol | Value | String |
---|---|---|
none | 0 | none |
reassoc | 1 | reassoc |
nnan | 2 | nnan |
ninf | 4 | ninf |
nsz | 8 | nsz |
arcp | 16 | arcp |
contract | 32 | contract |
afn | 64 | afn |
fast | 127 | fast |