24.02.1
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | CONVERT_DOWN_RTE_STR(x, type) (convert_##type##_rte((x))) |
Convert the given vector with round to nearest even rounding mode. More... | |
#define | CONVERT_DOWN_RTE(x, type) CONVERT_DOWN_RTE_STR(x, type) |
#define | QUANTIZE_IMPL(type, size) |
Quantize a vector of values from floating-point. More... | |
#define | DEQUANTIZE_IMPL(type, size) |
Dequantize a vector of values to floating-point. More... | |
#define | ASYMM_ROUNDING_DIVIDE_BY_POW2_IMPL(size) |
Correctly-rounded-to-nearest division by a power-of-two. More... | |
#define | ASYMM_MULT_IMPL(size) |
Product of two numbers, interpreting them as fixed-point values in the interval [-1, 1), rounding to the nearest value, and saturating -1 * -1 to the maximum value. More... | |
#define | ASYMM_EXP_ON_INTERVAL_BETWEEN_NEGATIVE_ONE_QUARTER_AND_0_EXCL_IMPL(size) |
Calculates \( exp(x) \) for x in [-1/4, 0). More... | |
#define | ASYMM_SELECT_USING_MASK_IMPL(size) |
Each bit of the result is set to the corresponding bit of either then_val or else_val depending on whether the corresponding bit of if_mask is set. More... | |
#define | ASYMM_MASK_IF_ZERO_IMPL(size) |
For each element of input vector, the corresponding bits of the result item are set if the input item is zero. More... | |
#define | ASYMM_MASK_IF_NON_ZERO_IMPL(size) |
For each element of input vector, the corresponding bits of the result item are set if the input item is non-zero. More... | |
#define | EXP_BARREL_SHIFTER_IMPL(size) |
#define | ASYMM_EXP_ON_NEGATIVE_VALUES_IMPL(size) |
Calculates \( exp(x) \) for x < 0. More... | |
#define | ASYMM_SATURATING_ROUNDING_MULT_BY_POW2_IMPL(size) |
Calculates the product of a integer value by a power of two, with either a positive exponent (equivalent to an arithmetic left shift, saturating) or a negative exponent (equivalent to an arithmetic right shift, rounding to nearest). More... | |
#define | ASYMM_ROUNDING_HALF_SUM_IMPL(size) |
Calculates (a+b)/2, rounded to the nearest integer. More... | |
#define | ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_IMPL(size) |
Calculates \( 1 / (1 + x) \) for x in (0, 1). More... | |
#define | ASYMM_RESCALE_IMPL(size) |
Considering the integer value as fixed-point, change the number of integer bits and update value accordingly. More... | |
#define | QUANTIZE_STR(input, offset, scale, type, size) quantize_##type##size(input, offset, scale) |
#define | QUANTIZE(input, offset, scale, type, size) QUANTIZE_STR(input, offset, scale, type, size) |
#define | DEQUANTIZE_STR(input, offset, scale, type, size) dequantize_##type##size(input, offset, scale) |
#define | DEQUANTIZE(input, offset, scale, type, size) DEQUANTIZE_STR(input, offset, scale, type, size) |
#define | ASYMM_ROUNDING_DIVIDE_BY_POW2_STR(x, exponent, size) asymm_rounding_divide_by_POW2_##size(x, exponent) |
#define | ASYMM_ROUNDING_DIVIDE_BY_POW2(x, exponent, size) ASYMM_ROUNDING_DIVIDE_BY_POW2_STR(x, exponent, size) |
#define | ASYMM_MULT_STR(a, b, size) asymm_mult##size(a, b) |
#define | ASYMM_MULT(a, b, size) ASYMM_MULT_STR(a, b, size) |
#define | ASYMM_MULT_BY_QUANT_MULTIPLIER_GREATER_THAN_ONE(x, quantized_multiplier, left_shift, size) ASYMM_MULT(x *((VEC_DATA_TYPE(int, size))(1) << (-left_shift)), quantized_multiplier, size) |
#define | ASYMM_MULT_BY_QUANT_MULTIPLIER_LESS_THAN_ONE(x, quantized_multiplier, right_shift, size) ASYMM_ROUNDING_DIVIDE_BY_POW2(ASYMM_MULT(x, quantized_multiplier, size), right_shift, size) |
#define | ASYMM_EXP_ON_INTERVAL_BETWEEN_NEGATIVE_ONE_QUARTER_AND_0_EXCL(a, size) asymm_exp_on_interval_between_negative_one_quarter_and_0_excl##size(a) |
#define | ASYMM_SELECT_USING_MASK(if_mask, then_val, else_val, size) asymm_select_using_mask##size(if_mask, then_val, else_val) |
#define | ASYMM_MASK_IF_ZERO(a, size) asymm_mask_if_zero##size(a) |
#define | ASYMM_MASK_IF_NON_ZERO(a, size) asymm_mask_if_non_zero##size(a) |
#define | EXP_BARREL_SHIFTER(result, exponent, fp_multiplier, k_integer_bits, k_fractional_bits, remainder, size) exp_barrel_shifter##size(result, exponent, fp_multiplier, k_integer_bits, k_fractional_bits, remainder) |
#define | ASYMM_EXP_ON_NEGATIVE_VALUES_STR(a, k_integer_bits, size) asymm_exp_on_negative_values##size(a, k_integer_bits) |
#define | ASYMM_EXP_ON_NEGATIVE_VALUES(a, k_integer_bits, size) ASYMM_EXP_ON_NEGATIVE_VALUES_STR(a, k_integer_bits, size) |
#define | ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_STR(a, size) asymm_one_over_one_plus_x_for_x_in_0_1##size(a) |
#define | ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1(a, size) ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_STR(a, size) |
#define | ASYMM_SATURATING_ROUNDING_MULT_BY_POW2(x, exponent, size) asymm_saturating_rounding_mult_by_pow2##size(x, exponent) |
#define | ASYMM_ROUNDING_HALF_SUM(a, b, size) asymm_rounding_half_sum##size(a, b) |
#define | ASYMM_RESCALE_STR(value, src_integer_bits, dst_integer_bits, size) asymm_rescale##size(value, src_integer_bits, dst_integer_bits) |
#define | ASYMM_RESCALE(value, src_integer_bits, dst_integer_bits, size) ASYMM_RESCALE_STR(value, src_integer_bits, dst_integer_bits, size) |
#define | MULTIPLY_BY_QUANTIZED_MULTIPLIER_IMPL(size) |
#define | MULTIPLY_BY_QUANTIZED_MULTIPLIER(input, qmul, shift, size) multiply_by_quantized_multiplier##size(input, qmul, shift) |
Functions | |
uchar | quantize_qasymm8 (float input, float offset, float scale) |
Quantize a floating-point scalar value to 8-bit asymmetric. More... | |
float | dequantize_qasymm8 (uchar input, float offset, float scale) |
Dequantize a scalar value from 8-bit asymmetric to floating-point. More... | |
float | dequantize_qasymm8_signed (char input, float offset, float scale) |
Dequantize a scalar value from signed 8-bit asymmetric to floating-point. More... | |
uchar | quantize_uchar1 (float input, float offset, float scale) |
char | quantize_char1 (float input, float offset, float scale) |
uint | quantize_uint1 (float input, float offset, float scale) |
int | quantize_int1 (float input, float offset, float scale) |
uchar2 | quantize_uchar2 (float2 input, float offset, float scale) |
char2 | quantize_char2 (float2 input, float offset, float scale) |
uint2 | quantize_uint2 (float2 input, float offset, float scale) |
int2 | quantize_int2 (float2 input, float offset, float scale) |
uchar3 | quantize_uchar3 (float3 input, float offset, float scale) |
char3 | quantize_char3 (float3 input, float offset, float scale) |
uint3 | quantize_uint3 (float3 input, float offset, float scale) |
int3 | quantize_int3 (float3 input, float offset, float scale) |
uchar4 | quantize_uchar4 (float4 input, float offset, float scale) |
ushort4 | quantize_ushort4 (float4 input, float offset, float scale) |
short4 | quantize_short4 (float4 input, float offset, float scale) |
int4 | quantize_int4 (float4 input, float offset, float scale) |
uchar8 | quantize_uchar8 (float8 input, float offset, float scale) |
char8 | quantize_char8 (float8 input, float offset, float scale) |
uint8 | quantize_uint8 (float8 input, float offset, float scale) |
int8 | quantize_int8 (float8 input, float offset, float scale) |
uchar16 | quantize_uchar16 (float16 input, float offset, float scale) |
char16 | quantize_char16 (float16 input, float offset, float scale) |
ushort16 | quantize_ushort16 (float16 input, float offset, float scale) |
short16 | quantize_short16 (float16 input, float offset, float scale) |
uint16 | quantize_uint16 (float16 input, float offset, float scale) |
int16 | quantize_int16 (float16 input, float offset, float scale) |
float | dequantize_uchar1 (uchar input, float offset, float scale) |
float | dequantize_char1 (char input, float offset, float scale) |
float | dequantize_uint1 (uint input, float offset, float scale) |
float | dequantize_int1 (int input, float offset, float scale) |
float2 | dequantize_uchar2 (uchar2 input, float offset, float scale) |
float2 | dequantize_char2 (char2 input, float offset, float scale) |
float2 | dequantize_uint2 (uint2 input, float offset, float scale) |
float2 | dequantize_int2 (int2 input, float offset, float scale) |
float3 | dequantize_uchar3 (uchar3 input, float offset, float scale) |
float3 | dequantize_char3 (char3 input, float offset, float scale) |
float3 | dequantize_uint3 (uint3 input, float offset, float scale) |
float3 | dequantize_int3 (int3 input, float offset, float scale) |
float4 | dequantize_uchar4 (uchar4 input, float offset, float scale) |
float4 | dequantize_ushort4 (ushort4 input, float offset, float scale) |
float4 | dequantize_short4 (short4 input, float offset, float scale) |
float4 | dequantize_int4 (int4 input, float offset, float scale) |
float8 | dequantize_uchar8 (uchar8 input, float offset, float scale) |
float8 | dequantize_char8 (char8 input, float offset, float scale) |
float8 | dequantize_uint8 (uint8 input, float offset, float scale) |
float8 | dequantize_int8 (int8 input, float offset, float scale) |
float16 | dequantize_uchar16 (uchar16 input, float offset, float scale) |
float16 | dequantize_char16 (char16 input, float offset, float scale) |
float16 | dequantize_ushort16 (ushort16 input, float offset, float scale) |
float16 | dequantize_short16 (short16 input, float offset, float scale) |
float16 | dequantize_uint16 (uint16 input, float offset, float scale) |
float16 | dequantize_int16 (int16 input, float offset, float scale) |
int | asymm_rounding_divide_by_POW2_1 (VEC_DATA_TYPE(int, 1) x, VEC_DATA_TYPE(int, 1) exponent) |
int2 | asymm_rounding_divide_by_POW2_2 (VEC_DATA_TYPE(int, 2) x, VEC_DATA_TYPE(int, 2) exponent) |
int3 | asymm_rounding_divide_by_POW2_3 (VEC_DATA_TYPE(int, 3) x, VEC_DATA_TYPE(int, 3) exponent) |
int4 | asymm_rounding_divide_by_POW2_4 (VEC_DATA_TYPE(int, 4) x, VEC_DATA_TYPE(int, 4) exponent) |
int8 | asymm_rounding_divide_by_POW2_8 (VEC_DATA_TYPE(int, 8) x, VEC_DATA_TYPE(int, 8) exponent) |
int16 | asymm_rounding_divide_by_POW2_16 (VEC_DATA_TYPE(int, 16) x, VEC_DATA_TYPE(int, 16) exponent) |
int | asymm_mult1 (VEC_DATA_TYPE(int, 1) a, VEC_DATA_TYPE(int, 1) b) |
int2 | asymm_mult2 (VEC_DATA_TYPE(int, 2) a, VEC_DATA_TYPE(int, 2) b) |
int3 | asymm_mult3 (VEC_DATA_TYPE(int, 3) a, VEC_DATA_TYPE(int, 3) b) |
int4 | asymm_mult4 (VEC_DATA_TYPE(int, 4) a, VEC_DATA_TYPE(int, 4) b) |
int8 | asymm_mult8 (VEC_DATA_TYPE(int, 8) a, VEC_DATA_TYPE(int, 8) b) |
int16 | asymm_mult16 (VEC_DATA_TYPE(int, 16) a, VEC_DATA_TYPE(int, 16) b) |
int | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl1 (VEC_DATA_TYPE(int, 1) a) |
int2 | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl2 (VEC_DATA_TYPE(int, 2) a) |
int3 | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl3 (VEC_DATA_TYPE(int, 3) a) |
int4 | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl4 (VEC_DATA_TYPE(int, 4) a) |
int8 | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl8 (VEC_DATA_TYPE(int, 8) a) |
int16 | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl16 (VEC_DATA_TYPE(int, 16) a) |
int | asymm_select_using_mask1 (VEC_DATA_TYPE(int, 1) if_mask, VEC_DATA_TYPE(int, 1) then_val, VEC_DATA_TYPE(int, 1) else_val) |
int2 | asymm_select_using_mask2 (VEC_DATA_TYPE(int, 2) if_mask, VEC_DATA_TYPE(int, 2) then_val, VEC_DATA_TYPE(int, 2) else_val) |
int3 | asymm_select_using_mask3 (VEC_DATA_TYPE(int, 3) if_mask, VEC_DATA_TYPE(int, 3) then_val, VEC_DATA_TYPE(int, 3) else_val) |
int4 | asymm_select_using_mask4 (VEC_DATA_TYPE(int, 4) if_mask, VEC_DATA_TYPE(int, 4) then_val, VEC_DATA_TYPE(int, 4) else_val) |
int8 | asymm_select_using_mask8 (VEC_DATA_TYPE(int, 8) if_mask, VEC_DATA_TYPE(int, 8) then_val, VEC_DATA_TYPE(int, 8) else_val) |
int16 | asymm_select_using_mask16 (VEC_DATA_TYPE(int, 16) if_mask, VEC_DATA_TYPE(int, 16) then_val, VEC_DATA_TYPE(int, 16) else_val) |
int | asymm_mask_if_zero1 (VEC_DATA_TYPE(int, 1) a) |
int2 | asymm_mask_if_zero2 (VEC_DATA_TYPE(int, 2) a) |
int3 | asymm_mask_if_zero3 (VEC_DATA_TYPE(int, 3) a) |
int4 | asymm_mask_if_zero4 (VEC_DATA_TYPE(int, 4) a) |
int8 | asymm_mask_if_zero8 (VEC_DATA_TYPE(int, 8) a) |
int16 | asymm_mask_if_zero16 (VEC_DATA_TYPE(int, 16) a) |
int | asymm_mask_if_non_zero1 (VEC_DATA_TYPE(int, 1) a) |
int2 | asymm_mask_if_non_zero2 (VEC_DATA_TYPE(int, 2) a) |
int3 | asymm_mask_if_non_zero3 (VEC_DATA_TYPE(int, 3) a) |
int4 | asymm_mask_if_non_zero4 (VEC_DATA_TYPE(int, 4) a) |
int8 | asymm_mask_if_non_zero8 (VEC_DATA_TYPE(int, 8) a) |
int16 | asymm_mask_if_non_zero16 (VEC_DATA_TYPE(int, 16) a) |
int | exp_barrel_shifter1 (VEC_DATA_TYPE(int, 1) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 1) remainder) |
int2 | exp_barrel_shifter2 (VEC_DATA_TYPE(int, 2) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 2) remainder) |
int3 | exp_barrel_shifter3 (VEC_DATA_TYPE(int, 3) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 3) remainder) |
int4 | exp_barrel_shifter4 (VEC_DATA_TYPE(int, 4) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 4) remainder) |
int8 | exp_barrel_shifter8 (VEC_DATA_TYPE(int, 8) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 8) remainder) |
int16 | exp_barrel_shifter16 (VEC_DATA_TYPE(int, 16) result, int exponent, int fp_multiplier, int k_integer_bits, int k_fractional_bits, VEC_DATA_TYPE(int, 16) remainder) |
int | asymm_exp_on_negative_values1 (VEC_DATA_TYPE(int, 1) a, int k_integer_bits) |
int2 | asymm_exp_on_negative_values2 (VEC_DATA_TYPE(int, 2) a, int k_integer_bits) |
int3 | asymm_exp_on_negative_values3 (VEC_DATA_TYPE(int, 3) a, int k_integer_bits) |
int4 | asymm_exp_on_negative_values4 (VEC_DATA_TYPE(int, 4) a, int k_integer_bits) |
int8 | asymm_exp_on_negative_values8 (VEC_DATA_TYPE(int, 8) a, int k_integer_bits) |
int16 | asymm_exp_on_negative_values16 (VEC_DATA_TYPE(int, 16) a, int k_integer_bits) |
int | asymm_saturating_rounding_mult_by_pow21 (VEC_DATA_TYPE(int, 1) x, int exponent) |
int2 | asymm_saturating_rounding_mult_by_pow22 (VEC_DATA_TYPE(int, 2) x, int exponent) |
int3 | asymm_saturating_rounding_mult_by_pow23 (VEC_DATA_TYPE(int, 3) x, int exponent) |
int4 | asymm_saturating_rounding_mult_by_pow24 (VEC_DATA_TYPE(int, 4) x, int exponent) |
int8 | asymm_saturating_rounding_mult_by_pow28 (VEC_DATA_TYPE(int, 8) x, int exponent) |
int16 | asymm_saturating_rounding_mult_by_pow216 (VEC_DATA_TYPE(int, 16) x, int exponent) |
int | asymm_rounding_half_sum1 (VEC_DATA_TYPE(int, 1) a, VEC_DATA_TYPE(int, 1) b) |
int2 | asymm_rounding_half_sum2 (VEC_DATA_TYPE(int, 2) a, VEC_DATA_TYPE(int, 2) b) |
int3 | asymm_rounding_half_sum3 (VEC_DATA_TYPE(int, 3) a, VEC_DATA_TYPE(int, 3) b) |
int4 | asymm_rounding_half_sum4 (VEC_DATA_TYPE(int, 4) a, VEC_DATA_TYPE(int, 4) b) |
int8 | asymm_rounding_half_sum8 (VEC_DATA_TYPE(int, 8) a, VEC_DATA_TYPE(int, 8) b) |
int16 | asymm_rounding_half_sum16 (VEC_DATA_TYPE(int, 16) a, VEC_DATA_TYPE(int, 16) b) |
int | asymm_one_over_one_plus_x_for_x_in_0_11 (VEC_DATA_TYPE(int, 1) a) |
int2 | asymm_one_over_one_plus_x_for_x_in_0_12 (VEC_DATA_TYPE(int, 2) a) |
int3 | asymm_one_over_one_plus_x_for_x_in_0_13 (VEC_DATA_TYPE(int, 3) a) |
int4 | asymm_one_over_one_plus_x_for_x_in_0_14 (VEC_DATA_TYPE(int, 4) a) |
int8 | asymm_one_over_one_plus_x_for_x_in_0_18 (VEC_DATA_TYPE(int, 8) a) |
int16 | asymm_one_over_one_plus_x_for_x_in_0_116 (VEC_DATA_TYPE(int, 16) a) |
int | asymm_rescale1 (VEC_DATA_TYPE(int, 1) value, int src_integer_bits, int dst_integer_bits) |
int2 | asymm_rescale2 (VEC_DATA_TYPE(int, 2) value, int src_integer_bits, int dst_integer_bits) |
int3 | asymm_rescale3 (VEC_DATA_TYPE(int, 3) value, int src_integer_bits, int dst_integer_bits) |
int4 | asymm_rescale4 (VEC_DATA_TYPE(int, 4) value, int src_integer_bits, int dst_integer_bits) |
int8 | asymm_rescale8 (VEC_DATA_TYPE(int, 8) value, int src_integer_bits, int dst_integer_bits) |
int16 | asymm_rescale16 (VEC_DATA_TYPE(int, 16) value, int src_integer_bits, int dst_integer_bits) |
int | multiply_by_quantized_multiplier1 (VEC_DATA_TYPE(int, 1) input, int qmul, int shift) |
int2 | multiply_by_quantized_multiplier2 (VEC_DATA_TYPE(int, 2) input, int qmul, int shift) |
int3 | multiply_by_quantized_multiplier3 (VEC_DATA_TYPE(int, 3) input, int qmul, int shift) |
int4 | multiply_by_quantized_multiplier4 (VEC_DATA_TYPE(int, 4) input, int qmul, int shift) |
int8 | multiply_by_quantized_multiplier8 (VEC_DATA_TYPE(int, 8) input, int qmul, int shift) |
int16 | multiply_by_quantized_multiplier16 (VEC_DATA_TYPE(int, 16) input, int qmul, int shift) |
#define ASYMM_EXP_ON_INTERVAL_BETWEEN_NEGATIVE_ONE_QUARTER_AND_0_EXCL | ( | a, | |
size | |||
) | asymm_exp_on_interval_between_negative_one_quarter_and_0_excl##size(a) |
Definition at line 410 of file helpers_asymm.h.
#define ASYMM_EXP_ON_INTERVAL_BETWEEN_NEGATIVE_ONE_QUARTER_AND_0_EXCL_IMPL | ( | size | ) |
Calculates \( exp(x) \) for x in [-1/4, 0).
[in] | size | Size of vector. |
Definition at line 171 of file helpers_asymm.h.
#define ASYMM_EXP_ON_NEGATIVE_VALUES | ( | a, | |
k_integer_bits, | |||
size | |||
) | ASYMM_EXP_ON_NEGATIVE_VALUES_STR(a, k_integer_bits, size) |
Definition at line 419 of file helpers_asymm.h.
#define ASYMM_EXP_ON_NEGATIVE_VALUES_IMPL | ( | size | ) |
Calculates \( exp(x) \) for x < 0.
[in] | size | Size of vector. |
Definition at line 262 of file helpers_asymm.h.
#define ASYMM_EXP_ON_NEGATIVE_VALUES_STR | ( | a, | |
k_integer_bits, | |||
size | |||
) | asymm_exp_on_negative_values##size(a, k_integer_bits) |
Definition at line 418 of file helpers_asymm.h.
#define ASYMM_MASK_IF_NON_ZERO | ( | a, | |
size | |||
) | asymm_mask_if_non_zero##size(a) |
Definition at line 415 of file helpers_asymm.h.
#define ASYMM_MASK_IF_NON_ZERO_IMPL | ( | size | ) |
For each element of input vector, the corresponding bits of the result item are set if the input item is non-zero.
[in] | size | Size of vector. |
a
is non zero. Definition at line 233 of file helpers_asymm.h.
#define ASYMM_MASK_IF_ZERO | ( | a, | |
size | |||
) | asymm_mask_if_zero##size(a) |
Definition at line 414 of file helpers_asymm.h.
#define ASYMM_MASK_IF_ZERO_IMPL | ( | size | ) |
For each element of input vector, the corresponding bits of the result item are set if the input item is zero.
[in] | size | Size of vector. |
a
is zero. Definition at line 218 of file helpers_asymm.h.
#define ASYMM_MULT | ( | a, | |
b, | |||
size | |||
) | ASYMM_MULT_STR(a, b, size) |
Definition at line 405 of file helpers_asymm.h.
#define ASYMM_MULT_BY_QUANT_MULTIPLIER_GREATER_THAN_ONE | ( | x, | |
quantized_multiplier, | |||
left_shift, | |||
size | |||
) | ASYMM_MULT(x *((VEC_DATA_TYPE(int, size))(1) << (-left_shift)), quantized_multiplier, size) |
Definition at line 406 of file helpers_asymm.h.
#define ASYMM_MULT_BY_QUANT_MULTIPLIER_LESS_THAN_ONE | ( | x, | |
quantized_multiplier, | |||
right_shift, | |||
size | |||
) | ASYMM_ROUNDING_DIVIDE_BY_POW2(ASYMM_MULT(x, quantized_multiplier, size), right_shift, size) |
Definition at line 408 of file helpers_asymm.h.
#define ASYMM_MULT_IMPL | ( | size | ) |
Product of two numbers, interpreting them as fixed-point values in the interval [-1, 1), rounding to the nearest value, and saturating -1 * -1 to the maximum value.
[in] | size | Size of vector. |
Definition at line 138 of file helpers_asymm.h.
#define ASYMM_MULT_STR | ( | a, | |
b, | |||
size | |||
) | asymm_mult##size(a, b) |
Definition at line 404 of file helpers_asymm.h.
#define ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1 | ( | a, | |
size | |||
) | ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_STR(a, size) |
Definition at line 421 of file helpers_asymm.h.
#define ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_IMPL | ( | size | ) |
Calculates \( 1 / (1 + x) \) for x in (0, 1).
[in] | size | Size of vector. |
Definition at line 359 of file helpers_asymm.h.
#define ASYMM_ONE_OVER_ONE_PLUS_X_FOR_X_IN_0_1_STR | ( | a, | |
size | |||
) | asymm_one_over_one_plus_x_for_x_in_0_1##size(a) |
Definition at line 420 of file helpers_asymm.h.
#define ASYMM_RESCALE | ( | value, | |
src_integer_bits, | |||
dst_integer_bits, | |||
size | |||
) | ASYMM_RESCALE_STR(value, src_integer_bits, dst_integer_bits, size) |
Definition at line 427 of file helpers_asymm.h.
#define ASYMM_RESCALE_IMPL | ( | size | ) |
Considering the integer value as fixed-point, change the number of integer bits and update value accordingly.
[in] | size | Size of vector. |
Definition at line 389 of file helpers_asymm.h.
#define ASYMM_RESCALE_STR | ( | value, | |
src_integer_bits, | |||
dst_integer_bits, | |||
size | |||
) | asymm_rescale##size(value, src_integer_bits, dst_integer_bits) |
Definition at line 425 of file helpers_asymm.h.
#define ASYMM_ROUNDING_DIVIDE_BY_POW2 | ( | x, | |
exponent, | |||
size | |||
) | ASYMM_ROUNDING_DIVIDE_BY_POW2_STR(x, exponent, size) |
Definition at line 403 of file helpers_asymm.h.
#define ASYMM_ROUNDING_DIVIDE_BY_POW2_IMPL | ( | size | ) |
Correctly-rounded-to-nearest division by a power-of-two.
[in] | size | Size of vector. |
Definition at line 118 of file helpers_asymm.h.
#define ASYMM_ROUNDING_DIVIDE_BY_POW2_STR | ( | x, | |
exponent, | |||
size | |||
) | asymm_rounding_divide_by_POW2_##size(x, exponent) |
Definition at line 402 of file helpers_asymm.h.
#define ASYMM_ROUNDING_HALF_SUM | ( | a, | |
b, | |||
size | |||
) | asymm_rounding_half_sum##size(a, b) |
Definition at line 424 of file helpers_asymm.h.
#define ASYMM_ROUNDING_HALF_SUM_IMPL | ( | size | ) |
Calculates (a+b)/2, rounded to the nearest integer.
Equivalent to VRHADD in the Arm Arm® Neon™ instruction set.
[in] | size | Size of vector. |
Definition at line 336 of file helpers_asymm.h.
#define ASYMM_SATURATING_ROUNDING_MULT_BY_POW2 | ( | x, | |
exponent, | |||
size | |||
) | asymm_saturating_rounding_mult_by_pow2##size(x, exponent) |
Definition at line 422 of file helpers_asymm.h.
#define ASYMM_SATURATING_ROUNDING_MULT_BY_POW2_IMPL | ( | size | ) |
Calculates the product of a integer value by a power of two, with either a positive exponent (equivalent to an arithmetic left shift, saturating) or a negative exponent (equivalent to an arithmetic right shift, rounding to nearest).
[in] | size | Size of vector. |
Definition at line 306 of file helpers_asymm.h.
#define ASYMM_SELECT_USING_MASK | ( | if_mask, | |
then_val, | |||
else_val, | |||
size | |||
) | asymm_select_using_mask##size(if_mask, then_val, else_val) |
Definition at line 412 of file helpers_asymm.h.
#define ASYMM_SELECT_USING_MASK_IMPL | ( | size | ) |
Each bit of the result is set to the corresponding bit of either then_val or else_val depending on whether the corresponding bit of if_mask is set.
Equivalent to the VBSL instruction in Arm® Neon™.
[in] | size | Size of vector. |
then_val
or from else_val
depending on corresponding bit in if_mask
is set or not. Definition at line 204 of file helpers_asymm.h.
#define CONVERT_DOWN_RTE | ( | x, | |
type | |||
) | CONVERT_DOWN_RTE_STR(x, type) |
Definition at line 37 of file helpers_asymm.h.
Convert the given vector with round to nearest even rounding mode.
[in] | x | The target to be converted |
[in] | type | The target type |
Definition at line 36 of file helpers_asymm.h.
#define DEQUANTIZE | ( | input, | |
offset, | |||
scale, | |||
type, | |||
size | |||
) | DEQUANTIZE_STR(input, offset, scale, type, size) |
Definition at line 400 of file helpers_asymm.h.
#define DEQUANTIZE_IMPL | ( | type, | |
size | |||
) |
Dequantize a vector of values to floating-point.
[in] | type | Input data type. |
[in] | size | Size of vector. |
Definition at line 105 of file helpers_asymm.h.
#define DEQUANTIZE_STR | ( | input, | |
offset, | |||
scale, | |||
type, | |||
size | |||
) | dequantize_##type##size(input, offset, scale) |
Definition at line 399 of file helpers_asymm.h.
#define EXP_BARREL_SHIFTER | ( | result, | |
exponent, | |||
fp_multiplier, | |||
k_integer_bits, | |||
k_fractional_bits, | |||
remainder, | |||
size | |||
) | exp_barrel_shifter##size(result, exponent, fp_multiplier, k_integer_bits, k_fractional_bits, remainder) |
Definition at line 416 of file helpers_asymm.h.
#define EXP_BARREL_SHIFTER_IMPL | ( | size | ) |
Definition at line 241 of file helpers_asymm.h.
#define MULTIPLY_BY_QUANTIZED_MULTIPLIER | ( | input, | |
qmul, | |||
shift, | |||
size | |||
) | multiply_by_quantized_multiplier##size(input, qmul, shift) |
Definition at line 438 of file helpers_asymm.h.
#define MULTIPLY_BY_QUANTIZED_MULTIPLIER_IMPL | ( | size | ) |
Definition at line 430 of file helpers_asymm.h.
#define QUANTIZE | ( | input, | |
offset, | |||
scale, | |||
type, | |||
size | |||
) | QUANTIZE_STR(input, offset, scale, type, size) |
Definition at line 398 of file helpers_asymm.h.
#define QUANTIZE_IMPL | ( | type, | |
size | |||
) |
Quantize a vector of values from floating-point.
[in] | type | Output data type. |
[in] | size | Size of vector. |
Definition at line 87 of file helpers_asymm.h.
#define QUANTIZE_STR | ( | input, | |
offset, | |||
scale, | |||
type, | |||
size | |||
) | quantize_##type##size(input, offset, scale) |
Definition at line 397 of file helpers_asymm.h.
|
inline |
Definition at line 509 of file helpers_asymm.h.
|
inline |
Definition at line 514 of file helpers_asymm.h.
|
inline |
Definition at line 510 of file helpers_asymm.h.
|
inline |
Definition at line 511 of file helpers_asymm.h.
|
inline |
Definition at line 512 of file helpers_asymm.h.
|
inline |
Definition at line 513 of file helpers_asymm.h.
|
inline |
Definition at line 544 of file helpers_asymm.h.
|
inline |
Definition at line 549 of file helpers_asymm.h.
|
inline |
Definition at line 545 of file helpers_asymm.h.
|
inline |
Definition at line 546 of file helpers_asymm.h.
|
inline |
Definition at line 547 of file helpers_asymm.h.
|
inline |
Definition at line 548 of file helpers_asymm.h.
|
inline |
Definition at line 530 of file helpers_asymm.h.
|
inline |
Definition at line 535 of file helpers_asymm.h.
|
inline |
Definition at line 531 of file helpers_asymm.h.
|
inline |
Definition at line 532 of file helpers_asymm.h.
|
inline |
Definition at line 533 of file helpers_asymm.h.
|
inline |
Definition at line 534 of file helpers_asymm.h.
|
inline |
Definition at line 523 of file helpers_asymm.h.
|
inline |
Definition at line 528 of file helpers_asymm.h.
|
inline |
Definition at line 524 of file helpers_asymm.h.
|
inline |
Definition at line 525 of file helpers_asymm.h.
|
inline |
Definition at line 526 of file helpers_asymm.h.
|
inline |
Definition at line 527 of file helpers_asymm.h.
|
inline |
Definition at line 502 of file helpers_asymm.h.
|
inline |
Definition at line 507 of file helpers_asymm.h.
|
inline |
Definition at line 503 of file helpers_asymm.h.
|
inline |
Definition at line 504 of file helpers_asymm.h.
|
inline |
Definition at line 505 of file helpers_asymm.h.
|
inline |
Definition at line 506 of file helpers_asymm.h.
|
inline |
Definition at line 565 of file helpers_asymm.h.
|
inline |
Definition at line 570 of file helpers_asymm.h.
|
inline |
Definition at line 566 of file helpers_asymm.h.
|
inline |
Definition at line 567 of file helpers_asymm.h.
|
inline |
Definition at line 568 of file helpers_asymm.h.
|
inline |
Definition at line 569 of file helpers_asymm.h.
|
inline |
Definition at line 572 of file helpers_asymm.h.
|
inline |
Definition at line 577 of file helpers_asymm.h.
|
inline |
Definition at line 573 of file helpers_asymm.h.
|
inline |
Definition at line 574 of file helpers_asymm.h.
|
inline |
Definition at line 575 of file helpers_asymm.h.
|
inline |
Definition at line 576 of file helpers_asymm.h.
|
inline |
Definition at line 495 of file helpers_asymm.h.
|
inline |
Definition at line 500 of file helpers_asymm.h.
|
inline |
Definition at line 496 of file helpers_asymm.h.
|
inline |
Definition at line 497 of file helpers_asymm.h.
|
inline |
Definition at line 498 of file helpers_asymm.h.
|
inline |
Definition at line 499 of file helpers_asymm.h.
|
inline |
Definition at line 558 of file helpers_asymm.h.
|
inline |
Definition at line 563 of file helpers_asymm.h.
|
inline |
Definition at line 559 of file helpers_asymm.h.
|
inline |
Definition at line 560 of file helpers_asymm.h.
|
inline |
Definition at line 561 of file helpers_asymm.h.
|
inline |
Definition at line 562 of file helpers_asymm.h.
|
inline |
Definition at line 551 of file helpers_asymm.h.
|
inline |
Definition at line 556 of file helpers_asymm.h.
|
inline |
Definition at line 552 of file helpers_asymm.h.
|
inline |
Definition at line 553 of file helpers_asymm.h.
|
inline |
Definition at line 554 of file helpers_asymm.h.
|
inline |
Definition at line 555 of file helpers_asymm.h.
|
inline |
Definition at line 516 of file helpers_asymm.h.
|
inline |
Definition at line 521 of file helpers_asymm.h.
|
inline |
Definition at line 517 of file helpers_asymm.h.
|
inline |
Definition at line 518 of file helpers_asymm.h.
|
inline |
Definition at line 519 of file helpers_asymm.h.
|
inline |
Definition at line 520 of file helpers_asymm.h.
|
inline |
Definition at line 469 of file helpers_asymm.h.
|
inline |
Definition at line 489 of file helpers_asymm.h.
|
inline |
Definition at line 473 of file helpers_asymm.h.
|
inline |
Definition at line 477 of file helpers_asymm.h.
|
inline |
Definition at line 485 of file helpers_asymm.h.
|
inline |
Definition at line 471 of file helpers_asymm.h.
|
inline |
Definition at line 493 of file helpers_asymm.h.
|
inline |
Definition at line 475 of file helpers_asymm.h.
|
inline |
Definition at line 479 of file helpers_asymm.h.
|
inline |
Definition at line 483 of file helpers_asymm.h.
|
inline |
Definition at line 487 of file helpers_asymm.h.
|
inline |
Dequantize a scalar value from 8-bit asymmetric to floating-point.
[in] | input | Input value to quantize |
[in] | offset | Quantization offset |
[in] | scale | Quantization scale |
Definition at line 62 of file helpers_asymm.h.
References arm_compute::test::validation::input, offset(), and arm_compute::test::validation::scale.
|
inline |
Dequantize a scalar value from signed 8-bit asymmetric to floating-point.
[in] | input | Input value to quantize |
[in] | offset | Quantization offset |
[in] | scale | Quantization scale |
Definition at line 75 of file helpers_asymm.h.
References arm_compute::test::validation::input, offset(), and arm_compute::test::validation::scale.
|
inline |
Definition at line 491 of file helpers_asymm.h.
|
inline |
Definition at line 482 of file helpers_asymm.h.
|
inline |
Definition at line 468 of file helpers_asymm.h.
|
inline |
Definition at line 488 of file helpers_asymm.h.
|
inline |
Definition at line 472 of file helpers_asymm.h.
|
inline |
Definition at line 476 of file helpers_asymm.h.
|
inline |
Definition at line 480 of file helpers_asymm.h.
|
inline |
Definition at line 484 of file helpers_asymm.h.
|
inline |
Definition at line 470 of file helpers_asymm.h.
|
inline |
Definition at line 492 of file helpers_asymm.h.
|
inline |
Definition at line 474 of file helpers_asymm.h.
|
inline |
Definition at line 478 of file helpers_asymm.h.
|
inline |
Definition at line 486 of file helpers_asymm.h.
|
inline |
Definition at line 490 of file helpers_asymm.h.
|
inline |
Definition at line 481 of file helpers_asymm.h.
|
inline |
Definition at line 537 of file helpers_asymm.h.
|
inline |
Definition at line 542 of file helpers_asymm.h.
|
inline |
Definition at line 538 of file helpers_asymm.h.
|
inline |
Definition at line 539 of file helpers_asymm.h.
|
inline |
Definition at line 540 of file helpers_asymm.h.
|
inline |
Definition at line 541 of file helpers_asymm.h.
|
inline |
Definition at line 579 of file helpers_asymm.h.
|
inline |
Definition at line 584 of file helpers_asymm.h.
|
inline |
Definition at line 580 of file helpers_asymm.h.
|
inline |
Definition at line 581 of file helpers_asymm.h.
|
inline |
Definition at line 582 of file helpers_asymm.h.
|
inline |
Definition at line 583 of file helpers_asymm.h.
|
inline |
Definition at line 442 of file helpers_asymm.h.
|
inline |
Definition at line 462 of file helpers_asymm.h.
|
inline |
Definition at line 446 of file helpers_asymm.h.
|
inline |
Definition at line 450 of file helpers_asymm.h.
|
inline |
Definition at line 458 of file helpers_asymm.h.
|
inline |
Definition at line 444 of file helpers_asymm.h.
|
inline |
Definition at line 466 of file helpers_asymm.h.
|
inline |
Definition at line 448 of file helpers_asymm.h.
|
inline |
Definition at line 452 of file helpers_asymm.h.
|
inline |
Definition at line 456 of file helpers_asymm.h.
|
inline |
Definition at line 460 of file helpers_asymm.h.
|
inline |
Quantize a floating-point scalar value to 8-bit asymmetric.
[in] | input | Input value to quantize |
[in] | offset | Quantization offset |
[in] | scale | Quantization scale |
Definition at line 47 of file helpers_asymm.h.
References CONVERT_DOWN_RTE, CONVERT_SAT, arm_compute::test::validation::input, offset(), and arm_compute::test::validation::scale.
|
inline |
Definition at line 464 of file helpers_asymm.h.
|
inline |
Definition at line 455 of file helpers_asymm.h.
|
inline |
Definition at line 441 of file helpers_asymm.h.
|
inline |
Definition at line 461 of file helpers_asymm.h.
|
inline |
Definition at line 445 of file helpers_asymm.h.
|
inline |
Definition at line 449 of file helpers_asymm.h.
|
inline |
Definition at line 453 of file helpers_asymm.h.
|
inline |
Definition at line 457 of file helpers_asymm.h.
|
inline |
Definition at line 443 of file helpers_asymm.h.
|
inline |
Definition at line 465 of file helpers_asymm.h.
|
inline |
Definition at line 447 of file helpers_asymm.h.
|
inline |
Definition at line 451 of file helpers_asymm.h.
|
inline |
Definition at line 459 of file helpers_asymm.h.
|
inline |
Definition at line 463 of file helpers_asymm.h.
|
inline |
Definition at line 454 of file helpers_asymm.h.