scalar_countbit1
Description
Counts the number of bits whose values are 1 in the 64-bit binary format of the source operand bitwise.
Prototype
scalar_countbit1(dst, src)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dst |
Output |
A Scalar of type uint64, for the destination operand |
src |
Input |
A Scalar of type uint64 or an immediate of type uint64, for the source operand |
Applicability
Returns
None
Example
from tbe import tik tik_instance = tik.Tik() src_scalar = tik_instance.Scalar(dtype="uint64") src_scalar.set_as(3) dst_scalar = tik_instance.Scalar(dtype="uint64") # dst_scalar=2 tik_instance.scalar_countbit1(dst_scalar, src_scalar) tik_instance.BuildCCE(kernel_name="run_scalar_countbit1", inputs=[], outputs=[])
Parent topic: Single Operand