scalar_sqrt
Description
Extracts the square root of a Scalar: 
Prototype
scalar_sqrt(dst, src)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
dst |
Output |
Destination operand. Has the same data type as the source operand. |
|
src |
Input |
Source operand. |
Applicability
Restrictions
A negative value is supported. The absolute value must be obtained before the square root.
Returns
None
Example
from tbe import tik tik_instance = tik.Tik() src_scalar = tik_instance.Scalar(dtype = "int64") dst_scalar = tik_instance.Scalar(dtype = "int64") # Set src_scalar to 10. src_scalar.set_as(10) # After the command is executed, the value of dst_scalar is 3. tik_instance.scalar_sqrt(dst_scalar, src_scalar) tik_instance.BuildCCE(kernel_name="run_scalar_sqrt", inputs=[], outputs=[])