taichi.lang.ops
¶
Module Contents¶
Functions¶
|
|
|
|
|
The sine function. |
|
The cosine function. |
|
The inverses function of sine. |
|
The inverses function of cosine. |
|
The square root function. |
|
The reciprocal of the square root function. |
|
The round function. |
|
The floor function. |
|
The ceil function. |
|
The tangent function. |
|
The hyperbolic tangent function. |
|
The exp function. |
|
The natural logarithm function. |
|
The random function. |
|
The inverses of the tangent function. |
|
Raw_div function. |
|
Raw_mod function. Both a and b can be float. |
|
Compute bitwise shift right (in taichi scope) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- taichi.lang.ops.cast(obj, dtype)¶
- taichi.lang.ops.bit_cast(obj, dtype)¶
- taichi.lang.ops.sin(a)¶
The sine function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
Sine of a.
- taichi.lang.ops.cos(a)¶
The cosine function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
Cosine of a.
- taichi.lang.ops.asin(a)¶
The inverses function of sine.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix with elements in [-1,1].- Returns
The inverses function of sine of a.
- taichi.lang.ops.acos(a)¶
The inverses function of cosine.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix with elements in [-1,1].- Returns
The inverses function of cosine of a.
- taichi.lang.ops.sqrt(a)¶
The square root function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix with elements not less than zero.- Returns
x such that x>=0 and x^2=a.
- taichi.lang.ops.rsqrt(a)¶
The reciprocal of the square root function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
The reciprocal of sqrt(a).
- taichi.lang.ops.round(a)¶
The round function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
The nearest integer of a.
- taichi.lang.ops.floor(a)¶
The floor function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
The greatest integer less than or equal to a.
- taichi.lang.ops.ceil(a)¶
The ceil function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
The least integer greater than or equal to a.
- taichi.lang.ops.tan(a)¶
The tangent function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
Tangent of a.
- taichi.lang.ops.tanh(a)¶
The hyperbolic tangent function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
(e**x - e**(-x)) / (e**x + e**(-x)).
- taichi.lang.ops.exp(a)¶
The exp function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix.- Returns
e to the a.
- taichi.lang.ops.log(a)¶
The natural logarithm function.
- Parameters
a (Union[
Expr
,Matrix
]) – A number or a matrix with elements greater than zero.- Returns
The natural logarithm of a.
- taichi.lang.ops.random(dtype=float)¶
The random function.
- Parameters
dtype (DataType) – Type of the random variable.
- Returns
A random variable whose type is dtype.
- taichi.lang.ops.atan2(a, b)¶
The inverses of the tangent function.
- taichi.lang.ops.raw_div(a, b)¶
Raw_div function.
- taichi.lang.ops.raw_mod(a, b)¶
Raw_mod function. Both a and b can be float.
- taichi.lang.ops.bit_shr(a, b)¶
Compute bitwise shift right (in taichi scope)
- taichi.lang.ops.select(cond, a, b)¶
- taichi.lang.ops.atomic_add(a, b)¶
- taichi.lang.ops.atomic_sub(a, b)¶
- taichi.lang.ops.atomic_min(a, b)¶
- taichi.lang.ops.atomic_max(a, b)¶
- taichi.lang.ops.atomic_and(a, b)¶
- taichi.lang.ops.atomic_or(a, b)¶
- taichi.lang.ops.atomic_xor(a, b)¶
- taichi.lang.ops.max(*args)¶
- taichi.lang.ops.min(*args)¶