Skip to content
heliaCORE
API reference
HELIA HUB

Comparison Functions

Comparison operators with optional broadcasting support.

Machine-readable model

function

Convert a contiguous Boolean mask to binary32 +0.0 or +1.0.

Include/arm_nnfunctions_flt.h:88

arm_cmsis_nn_status arm_nn_cast_bool_f32(const bool *input, float32_t *output, int32_t count)

Convert a contiguous Boolean mask to binary32 +0.0 or +1.0.

Parameters of arm_nn_cast_bool_f32
NameTypeDirectionDescription
inputconst bool *inContiguous valid C bool objects (one-byte 0/1 on Arm).
outputfloat32_t *outContiguous result with count elements, disjoint from the input.
countint32_tinPositive number of elements, at most INT32_MAX / 4.
Returns of arm_nn_cast_bool_f32
Description
ARM_CMSIS_NN_SUCCESS or ARM_CMSIS_NN_ARG_ERROR for null pointers or invalid count.
function

Ordered IEEE binary32 greater-than comparison with NHWC singleton broadcasting.

Include/arm_nnfunctions_flt.h:102

arm_cmsis_nn_status arm_greater_f32(
const float32_t *input_1,
const cmsis_nn_dims *input_1_dims,
const float32_t *input_2,
const cmsis_nn_dims *input_2_dims,
bool *output,
const cmsis_nn_dims *output_dims
)

Ordered IEEE binary32 greater-than comparison with NHWC singleton broadcasting.

Parameters of arm_greater_f32
NameTypeDirectionDescription
input_1const float32_t *inFirst operand.
input_1_dimsconst cmsis_nn_dims *inPositive NHWC shape of the first operand.
input_2const float32_t *inSecond operand.
input_2_dimsconst cmsis_nn_dims *inPositive NHWC shape of the second operand.
outputbool *outContiguous Boolean mask, disjoint from both input tensors and all three dimension structures.
output_dimsconst cmsis_nn_dims *inExact broadcast shape. Its element count must fit INT32_MAX / 4.
Returns of arm_greater_f32
Description
ARM_CMSIS_NN_SUCCESS or ARM_CMSIS_NN_ARG_ERROR.
function

Convert a contiguous Boolean mask to INT32 zero or one.

Include/arm_nnfunctions.h:4958

arm_cmsis_nn_status arm_nn_cast_bool_s32(const bool *input, int32_t *output, int32_t count)

Convert a contiguous Boolean mask to INT32 zero or one.

Parameters of arm_nn_cast_bool_s32
NameTypeDirectionDescription
inputconst bool *inContiguous valid C bool objects (one-byte 0/1 on Arm).
outputint32_t *outContiguous result with count elements, disjoint from the input.
countint32_tinPositive number of elements, at most INT32_MAX / 4.
Returns of arm_nn_cast_bool_s32
Description
ARM_CMSIS_NN_SUCCESS or ARM_CMSIS_NN_ARG_ERROR for null pointers or invalid count.
function

Count the true values in a contiguous Boolean tensor.

Include/arm_nnfunctions.h:4969

arm_cmsis_nn_status arm_nn_count_true(const bool *input, int32_t *output, int32_t count)

Count the true values in a contiguous Boolean tensor.

Parameters of arm_nn_count_true
NameTypeDirectionDescription
inputconst bool *inContiguous valid C bool objects (one-byte 0/1 on Arm).
outputint32_t *outOne INT32 result, disjoint from the input.
countint32_tinPositive number of Boolean elements.
Returns of arm_nn_count_true
Description
ARM_CMSIS_NN_SUCCESS or ARM_CMSIS_NN_ARG_ERROR for null pointers or invalid count.