Complex Dialect
Refer to the official documentation for more details.
Reactant.MLIR.Dialects.complex.abs Method
abs
The abs op takes a single complex number and computes its absolute value.
Example
%a = complex.abs %b : complex<f32>Reactant.MLIR.Dialects.complex.add Method
add
The add operation takes two complex numbers and returns their sum.
Example
%a = complex.add %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.angle Method
angle
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>Reactant.MLIR.Dialects.complex.atan2 Method
atan2
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>Reactant.MLIR.Dialects.complex.bitcast Method
bitcast
Example
%a = complex.bitcast %b : complex<f32> -> i64Reactant.MLIR.Dialects.complex.conj Method
conj
The conj op takes a single complex number and computes the complex conjugate.
Example
%a = complex.conj %b: complex<f32>Reactant.MLIR.Dialects.complex.constant Method
constant
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>Reactant.MLIR.Dialects.complex.cos Method
cos
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>Reactant.MLIR.Dialects.complex.create Method
create
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>Reactant.MLIR.Dialects.complex.div Method
div
The div operation takes two complex numbers and returns result of their division:
%a = complex.div %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.eq Method
eq
The eq op takes two complex numbers and returns whether they are equal.
Example
%a = complex.eq %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.exp Method
exp
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>Reactant.MLIR.Dialects.complex.expm1 Method
expm1
complex.expm1(x) := complex.exp(x) - 1
Example
%a = complex.expm1 %b : complex<f32>Reactant.MLIR.Dialects.complex.im Method
im
The im op takes a single complex number and extracts the imaginary part.
Example
%a = complex.im %b : complex<f32>Reactant.MLIR.Dialects.complex.log Method
log
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>Reactant.MLIR.Dialects.complex.log1p Method
log1p
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>Reactant.MLIR.Dialects.complex.mul Method
mul
The mul operation takes two complex numbers and returns their product:
%a = complex.mul %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.neg Method
neg
The neg op takes a single complex number complex and returns -complex.
Example
%a = complex.neg %b : complex<f32>Reactant.MLIR.Dialects.complex.neq Method
neq
The neq op takes two complex numbers and returns whether they are not equal.
Example
%a = complex.neq %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.pow Method
pow
The pow operation takes a complex number raises it to the given complex exponent.
Example
%a = complex.pow %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.powi Method
powi
The powi operation takes a base operand of complex type and a power operand of signed integer type and returns one result of the same type as base. The result is base raised to the power of power.
Example
%a = complex.powi %b, %c : complex<f32>, i32Reactant.MLIR.Dialects.complex.re Method
re
The re op takes a single complex number and extracts the real part.
Example
%a = complex.re %b : complex<f32>Reactant.MLIR.Dialects.complex.rsqrt Method
rsqrt
The rsqrt operation computes reciprocal of square root.
Example
%a = complex.rsqrt %b : complex<f32>Reactant.MLIR.Dialects.complex.sign Method
sign
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>Reactant.MLIR.Dialects.complex.sin Method
sin
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>Reactant.MLIR.Dialects.complex.sqrt Method
sqrt
The sqrt operation takes a complex number and returns its square root.
Example
%a = complex.sqrt %b : complex<f32>Reactant.MLIR.Dialects.complex.sub Method
sub
The sub operation takes two complex numbers and returns their difference.
Example
%a = complex.sub %b, %c : complex<f32>Reactant.MLIR.Dialects.complex.tan Method
tan
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>Reactant.MLIR.Dialects.complex.tanh Method
tanh
The tanh operation takes a complex number and returns its hyperbolic tangent.
Example
%a = complex.tanh %b : complex<f32>