scalar_min

Description

Compares two source operands and returns the minimum:

Prototype

scalar_min(dst, src0, src1)

Parameters

Table 1 Parameter description

Parameter

Input/Output

Description

dst

Output

Destination operand.

Atlas 200/300/500 Inference Product : a Scalar of type int64

Atlas Training Series Product : a Scalar of type int64

src0

Input

Source operand 0.

Atlas 200/300/500 Inference Product : a Scalar of type int64 or an immediate of type int64

Atlas Training Series Product : a Scalar of type int64 or an immediate of type int64

src1

Input

Source operand 1.

Atlas 200/300/500 Inference Product : a Scalar of type int64 or an immediate of type int64

Atlas Training Series Product : a Scalar of type int64 or an immediate of type int64

Applicability

Atlas 200/300/500 Inference Product

Atlas Training Series Product

Restrictions

The operands must have the same data type.

Returns

None

Example

from tbe import tik
tik_instance = tik.Tik()
src0_scalar = tik_instance.Scalar(dtype="int64", name='src0_scalar', init_value=3)
src1_scalar = tik_instance.Scalar(dtype="int64", name='src1_scalar', init_value=2)
dst_scalar = tik_instance.Scalar(dtype="int64", name='dst_scalar')
# dst_scalar=2
tik_instance.scalar_min(dst_scalar, src0_scalar, src1_scalar)
tik_instance.BuildCCE(kernel_name="run_scalar_max", inputs=[], outputs=[])