spinn_common 7.3.1
Support code for SpiNNaker applications.
|
Additions to the stdfix.h file to support full Draft ISO/IEC standards compliance. More...
#include <stdint.h>
#include <stdbool.h>
#include "arm_acle.h"
#include <stdfix.h>
Go to the source code of this file.
Macros | |
#define | min(a, b) (((a)<(b)) ? (a) : (b)) |
Returns the minimum of two arguments. | |
#define | __stdfix_max(a, b) (((a)<(b)) ? (b) : (a)) |
Returns the maximum of two arguments. | |
#define | __stdfix_use(a) do {} while ((a)!=(a)) |
A macro definition which pretends to use variable a . | |
#define | __stdfix_abs(a) (((a)<0) ? -(a) : (a)) |
Returns the absolute value of its argument. | |
#define | __stdfix_ms_u32(x) ((x) >> 32) |
Returns the most significant 32-bits of a 64-bit argument. | |
#define | __stdfix_ls_u32(x) ((x) & UINT32_MAX) |
Returns the least significant 32-bits of a 64-bit argument. | |
#define | __I(x) ((int) (x)) |
Cast to int. | |
#define | __I32(x) ((int32_t) (x)) |
Cast to int32_t. | |
#define | __I64(x) ((int64_t) (x)) |
Cast to int64_t. | |
#define | __LI(x) ((long int) (x)) |
Cast to long int. | |
#define | __U32(x) ((uint32_t) (x)) |
Cast to uint32_t. | |
#define | __U64(x) ((uint64_t) (x)) |
Cast to uint64_t. | |
#define | __UI(x) ((unsigned int) (x)) |
Cast to unsigned int. | |
#define | __ULI(x) ((unsigned long int) (x)) |
Cast to unsigned long int. | |
7.18a.6.7 | |
Type-generic fixed-point functions For each of the fixed-point absolute value functions in 7.18a.6.2, the fixed-point rounding functions in 7.18a.6.3 and the fixed-point countls functions in 7.18a.6.4, a type-generic macro is defined as follows: type-generic macro the fixed-point absolute value functions absfx the fixed-point rounding functions roundfx the fixed-point countls functions countlsfx For each macro, use of the macro invokes the function whose corresponding type and type domain is the fixed-point type of the first generic argument. If the type of the first generic argument is not a fixed-point type, the behavior is undefined | |
#define | absfx(f) |
This macro provides type-generic access to the absolute value functions. | |
#define | roundfx(f, n) |
This macro provides type-generic access to the rounding functions. | |
#define | countlsfx(f) |
This macro provides type-generic access to the functions for counting leading sign-bits. | |
Functions | |
void | __stdfix_64x64_128 (uint64_t *hi, uint64_t *lo, uint64_t x, uint64_t y) |
Multiplies two 64-bit unsigned integers returning a 128-bit result in hi and lo . | |
static int32_t | __stdfix_sat_hr (const int32_t x) |
Saturates an integer to 8 bits. | |
static int32_t | __stdfix_sat_r (const int32_t x) |
Saturates an integer to 16 bits. | |
static int32_t | __stdfix_sat_lr (const int64_t x) |
Saturates a 64-bit integer to 32-bits. | |
static int32_t | __stdfix_sat_hk (const int32_t x) |
Saturates an integer to 16 bits. | |
static int32_t | __stdfix_sat_k (const int64_t x) |
Saturates a 64-bit integer to 32-bits. | |
static uint32_t | __stdfix_sat_uhr (const uint32_t x) |
Saturates an unsigned integer to 8 bits. | |
static uint32_t | __stdfix_sat_ur (const uint32_t x) |
Saturates an unsigned integer to 16 bits. | |
static uint32_t | __stdfix_sat_ulr (const uint64_t x) |
Saturates an unsigned 64-bit integer to 32 bits. | |
static uint32_t | __stdfix_sat_uhk (const uint32_t x) |
Saturates an unsigned integer to 16 bits. | |
static uint32_t | __stdfix_sat_uk (const uint64_t x) |
Saturates an unsigned 64-bit integer to 32 bits. | |
static int32_t | __stdfix_sadd_hr (int_hr_t x, int_hr_t y) |
Saturated addition of the underlying integer representations. | |
static int32_t | __stdfix_ssub_hr (int_hr_t x, int_hr_t y) |
Saturated subtraction of the underlying integer representations. | |
static int32_t | __stdfix_sneg_hr (int_hr_t x) |
Saturated negation of the underlying integer representations. | |
static int32_t | __stdfix_sadd_r (int32_t x, int32_t y) |
Saturated addition of the underlying integer representations. | |
static int32_t | __stdfix_ssub_r (int32_t x, int32_t y) |
Saturated subtraction of the underlying integer representations. | |
static int32_t | __stdfix_sneg_r (int32_t x) |
Saturated negation of the underlying integer representations. | |
static int32_t | __stdfix_sadd_lr (int32_t x, int32_t y) |
Saturated addition of the underlying integer representations. | |
static int32_t | __stdfix_ssub_lr (int32_t x, int32_t y) |
Saturated subtraction of the underlying integer representations. | |
static int32_t | __stdfix_sneg_lr (int32_t x) |
Saturated negation of the underlying integer representations. | |
static int32_t | __stdfix_sadd_hk (int32_t x, int32_t y) |
Saturated addition of the underlying integer representations. | |
static int32_t | __stdfix_ssub_hk (int32_t x, int32_t y) |
Saturated subtraction of the underlying integer representations. | |
static int32_t | __stdfix_sneg_hk (int32_t x) |
Saturated negation of the underlying integer representations. | |
static int32_t | __stdfix_sadd_k (int32_t x, int32_t y) |
Saturated addition of the underlying integer representations. | |
static int32_t | __stdfix_ssub_k (int32_t x, int32_t y) |
Saturated subtraction of the underlying integer representations. | |
static int32_t | __stdfix_sneg_k (int32_t x) |
Saturated negation of the underlying integer representations. | |
int64_t | __stdfix_sadd_lk (int64_t x, int64_t y) |
Saturated addition of the underlying integer representations. | |
int64_t | __stdfix_ssub_lk (int64_t x, int64_t y) |
Saturated subtraction of the underlying integer representations. | |
int64_t | __stdfix_sneg_lk (int64_t x) |
Saturated negation of the underlying integer representations. | |
static int32_t | __stdfix_smul_hr (int32_t x, int32_t y) |
Saturated multiplication of the underlying integer representations. | |
static int32_t | __stdfix_smul_r (int32_t x, int32_t y) |
Saturated multiplication of the underlying integer representations. | |
static int32_t | __stdfix_smul_lr (int32_t x, int32_t y) |
Saturated multiplication of the underlying integer representations. | |
static int32_t | __stdfix_smul_hk (int32_t x, int32_t y) |
Saturated multiplication of the underlying integer representations. | |
static int32_t | __stdfix_smul_k (int32_t x, int32_t y) |
Saturated multiplication of the underlying integer representations. | |
int64_t | __stdfix_smul_lk (int64_t x, int64_t y) |
Saturated multiplication of the underlying integer representations. | |
static uint32_t | __stdfix_sadd_uhr (uint32_t x, uint32_t y) |
Saturated addition of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_ssub_uhr (uint32_t x, uint32_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_sadd_ur (uint32_t x, uint32_t y) |
Saturated addition of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_ssub_ur (uint32_t x, uint32_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_sadd_ulr (uint32_t x, uint32_t y) |
Saturated addition of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_ssub_ulr (uint32_t x, uint32_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_sadd_uhk (uint32_t x, uint32_t y) |
Saturated addition of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_ssub_uhk (uint32_t x, uint32_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_sadd_uk (uint32_t x, uint32_t y) |
Saturated addition of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_ssub_uk (uint32_t x, uint32_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
uint64_t | __stdfix_sadd_ulk (uint64_t x, uint64_t y) |
Saturated addition of the underlying unsigned integer representations. | |
uint64_t | __stdfix_ssub_ulk (uint64_t x, uint64_t y) |
Saturated subtraction of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_smul_uhr (uint32_t x, uint32_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_smul_ur (uint32_t x, uint32_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_smul_ulr (uint32_t x, uint32_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_smul_uhk (uint32_t x, uint32_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
static uint32_t | __stdfix_smul_uk (uint32_t x, uint32_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
uint64_t | __stdfix_smul_ulk (uint64_t x, uint64_t y) |
Saturated multiplication of the underlying unsigned integer representations. | |
7.18a.6.5 | |
The bitwise fixed-point to integer conversion functions | |
static int_hr_t | bitshr (const s07 f) |
Converts a short fract into an integer. | |
static int_r_t | bitsr (const s015 f) |
Converts a fract into an integer. | |
static int_lr_t | bitslr (const s031 f) |
Converts a long fract into an integer. | |
static int_hk_t | bitshk (const s87 f) |
Converts a short accum into an integer. | |
static int_k_t | bitsk (const s1615 f) |
Converts an accum into an integer. | |
static int_lk_t | bitslk (const s3231 f) |
Converts a long accum into an integer. | |
static uint_uhr_t | bitsuhr (const u08 f) |
Converts an unsigned short fract into an integer. | |
static uint_ur_t | bitsur (const u016 f) |
Converts an unsigned fract into an integer. | |
static uint_ulr_t | bitsulr (const u032 f) |
Converts an unsigned long fract into an integer. | |
static uint_uhk_t | bitsuhk (const u88 f) |
Converts an unsigned short accum into an integer. | |
static uint_uk_t | bitsuk (const u1616 f) |
Converts an unsigned accum into an integer. | |
static uint_ulk_t | bitsulk (const u3232 f) |
Converts an unsigned long accum into an integer. | |
7.18a.6.6 | |
The bitwise integer to fixed-point conversion functions | |
static s07 | hrbits (const int_hr_t n) |
Converts a signed integer into a signed short fract. | |
static s015 | rbits (const int_r_t n) |
Converts a signed integer into a signed fract. | |
static s031 | lrbits (const int_lr_t n) |
Converts a signed integer into a signed long fract. | |
static s87 | hkbits (const int_hk_t n) |
Converts a signed integer into a signed short accum. | |
static s1615 | kbits (const int_k_t n) |
Converts a signed integer into a signed accum. | |
static s3231 | lkbits (const int_lk_t n) |
Converts a signed integer into a signed long accum. | |
static u08 | uhrbits (const uint_uhr_t n) |
Converts an unsigned integer into an unsigned short fract. | |
static u016 | urbits (const uint_ur_t n) |
Converts an unsigned integer into an unsigned fract. | |
static u032 | ulrbits (const uint_ulr_t n) |
Converts an unsigned integer into an unsigned long fract. | |
static u88 | uhkbits (const uint_uhk_t n) |
Converts an unsigned integer into an unsigned short accum. | |
static u1616 | ukbits (const uint_uk_t n) |
Converts an unsigned integer into an unsigned accum. | |
static u3232 | ulkbits (const uint_ulk_t n) |
Converts an unsigned integer into an unsigned long accum. | |
7.18a.6.1 | |
The fixed-point arithmetic operation support functions These functions compute the mathematically exact result of the multiplication or division operation on the operands with the indicated types, and return a value with the indicated type. For functions returning an integer value, the return value is rounded towards zero. For functions returning a fixed-point value, the return value is saturated on overflow. If the second operand of one of the divide functions is zero, the behavior is undefined. | |
static int | mulir (int n, s015 x) |
Multiplies an integer by a fract giving an integer answer. | |
static long int | mulilr (long int n, s031 x) |
Multiplies a long integer by a long fract giving an integer answer. | |
static int | mulik (int n, s1615 x) |
Multiplies an integer by an accum giving an integer answer. | |
static long int | mulilk (long int n, s3231 x) |
Multiplies a long integer by a long accum giving a long integer answer. | |
static int | divir (int n, s015 x) |
Divides an integer by a fract giving an integer answer. | |
static long int | divilr (long int n, s031 x) |
Divides a long integer by a long fract giving a long integer answer. | |
static int | divik (int n, s1615 x) |
Divides an integer by an accum giving an integer answer. | |
static long int | divilk (long int n, s3231 x) |
Divides an integer by a long accum giving a long integer answer. | |
static s015 | rdivi (int i, int j) |
Divides two integers giving a fract answer. | |
static s031 | lrdivi (long int i, long int j) |
Divides two integers giving a long fract answer. | |
static s1615 | kdivi (int i, int j) |
Divides two integers giving an accum answer. | |
static s3231 | lkdivi (long int i, long int j) |
Divides two integers giving a long accum answer. | |
static int | idivr (s015 x, s015 y) |
Divides two fracts giving an integer answer. | |
static long int | idivlr (s031 x, s031 y) |
Divides two long fracts giving a long integer answer. | |
static int | idivk (s1615 x, s1615 y) |
Divides two accums giving an integer answer. | |
static long int | idivlk (s3231 x, s3231 y) |
Divides two long accums giving a long integer answer. | |
static unsigned int | muliur (unsigned int n, u016 x) |
Multiplies an unsigned integer by an unsigned fract giving an unsigned integer answer. | |
static unsigned long int | muliulr (unsigned long int n, u032 x) |
Multiplies an unsigned long integer by an unsigned long fract giving an unsigned integer answer. | |
static unsigned int | muliuk (unsigned int n, u1616 x) |
Multiplies an unsigned integer by an unsigned accum giving an unsigned integer answer. | |
static unsigned long int | muliulk (unsigned long int n, u3232 x) |
Multiplies an unsigned long integer by an unsigned long accum giving an unsigned long integer answer. | |
static unsigned int | diviur (unsigned int n, u016 x) |
Divides an unsigned integer by an unsigned fract giving an unsigned integer answer. | |
static unsigned long int | diviulr (unsigned long int n, u032 x) |
Divides a long unsigned integer by a long unsigned fract giving an unsigned integer answer. | |
static unsigned int | diviuk (unsigned int n, u1616 x) |
Divides an unsigned integer by an unsigned accum giving an unsigned integer answer. | |
static unsigned long int | diviulk (unsigned long int n, u3232 x) |
Divides a long unsigned integer by a long unsigned accum giving an unsigned integer answer. | |
static u016 | urdivi (unsigned int i, unsigned int j) |
Divides two unsigned integers giving an unsigned fract answer. | |
static u032 | ulrdivi (unsigned long int i, unsigned long int j) |
Divides two unsigned long integers giving an unsigned long fract answer. | |
static u1616 | ukdivi (unsigned int i, unsigned int j) |
Divides two unsigned integers giving an unsigned accum answer. | |
static u3232 | ulkdivi (unsigned long int i, unsigned long int j) |
Divides two unsigned long integers giving an unsigned long accum answer. | |
static unsigned int | idivur (u016 x, u016 y) |
Divides two unsigned fracts giving an unsigned integer answer. | |
static unsigned long int | idivulr (u032 x, u032 y) |
Divides two unsigned long fracts giving an unsigned long integer answer. | |
static unsigned int | idivuk (u1616 x, u1616 y) |
Divides two unsigned accums giving an unsigned integer answer. | |
static unsigned long int | idivulk (u3232 x, u3232 y) |
Divides two unsigned long accums giving an unsigned long integer answer. | |
7.18a.6.2 | |
The fixed-point absolute value functions These functions compute the absolute value of a fixed-point value f. The functions return | |
static s07 | abshr (s07 f) |
This function returns the absolute value of a short fract. | |
static s015 | absr (s015 f) |
This function returns the absolute value of a fract. | |
static s031 | abslr (s031 f) |
This function returns the absolute value of a long fract. | |
static s87 | abshk (s87 f) |
This function returns the absolute value of a short accum. | |
static s1615 | absk (s1615 f) |
This function returns the absolute value of an accum. | |
static s3231 | abslk (s3231 f) |
This function returns the absolute value of a long accum. | |
7.18a.6.3 | |
The fixed-point rounding functions These functions compute the value of The rounding functions return the rounded result, as specified. If the value of | |
static uint8_t | __stdfix_round_u8 (uint8_t x, int n) |
This function rounds the input unsigned 8-bit integer to a number of bits, returning an 8-bit integer. | |
static uint16_t | __stdfix_round_u16 (uint16_t x, int n) |
This function rounds the input unsigned 16-bit integer to a number of bits, returning a 16-bit integer. | |
static uint32_t | __stdfix_round_u32 (uint32_t x, int n) |
This function rounds the input unsigned 32-bit integer to a number of bits, returning a 32-bit integer. | |
static uint64_t | __stdfix_round_u64 (uint64_t x, int n) |
This function rounds the input unsigned 64-bit integer to a number of bits, returning a 64-bit integer. | |
static int8_t | __stdfix_round_s8 (int8_t x, int n) |
This function rounds the input signed 8-bit integer to a number of bits, returning an 8-bit integer. | |
static int16_t | __stdfix_round_s16 (int16_t x, int n) |
This function rounds the input signed 16-bit integer to a number of bits, returning a 16-bit integer. | |
static int32_t | __stdfix_round_s32 (int32_t x, int n) |
This function rounds the input signed 32-bit integer to a number of bits, returning a 32-bit integer. | |
static int64_t | __stdfix_round_s64 (int64_t x, int n) |
This function rounds the input signed 64-bit integer to a number of bits, returning a 64-bit integer. | |
static s07 | roundhr (s07 f, int n) |
This function rounds the input short fract to a number of bits, returning a short fract. | |
static s015 | roundr (s015 f, int n) |
This function rounds the input fract to a number of bits, returning a fract. | |
static s031 | roundlr (s031 f, int n) |
This function rounds the input long fract to a number of bits, returning a long fract. | |
static s87 | roundhk (s87 f, int n) |
This function rounds the input short accum to a number of bits, returning a short accum. | |
static s1615 | roundk (s1615 f, int n) |
This function rounds the input accum to a number of bits, returning an accum. | |
static s3231 | roundlk (s3231 f, int n) |
This function rounds the input long accum to a number of bits, returning a long accum. | |
static u08 | rounduhr (u08 f, int n) |
This function rounds the input unsigned short fract to a number of bits, returning an unsigned short fract. | |
static u016 | roundur (u016 f, int n) |
This function rounds the input unsigned fract to a number of bits, returning an unsigned fract. | |
static u032 | roundulr (u032 f, int n) |
This function rounds the input unsigned long fract to a number of bits, returning an unsigned long fract. | |
static u88 | rounduhk (u88 f, int n) |
This function rounds the input unsigned short accum to a number of bits, returning an unsigned short accum. | |
static u1616 | rounduk (u1616 f, int n) |
This function rounds the input unsigned accum to a number of bits, returning an unsigned accum. | |
static u3232 | roundulk (u3232 f, int n) |
This function rounds the input unsigned long accum to a number of bits, returning an unsigned long accum. | |
7.18a.6.4 | |
The fixed-point The integer return value of these functions is defined as follows:
| |
static int | countlshr (s07 f) |
This function counts the number of leading sign-bits of a short fract. | |
static int | countlsr (s015 f) |
This function counts the number of leading sign-bits of a fract. | |
static int | countlslr (s031 f) |
This function counts the number of leading sign-bits of a long fract. | |
static int | countlshk (s87 f) |
This function counts the number of leading sign-bits of a short accum. | |
static int | countlsk (s1615 f) |
This function counts the number of leading sign-bits of an accum. | |
static int | countlslk (s3231 f) |
This function counts the number of leading sign-bits of a long accum. | |
static int | countlsuhr (u08 f) |
This function counts the number of leading zeros of an unsigned short fract. | |
static int | countlsur (u016 f) |
This function counts the number of leading zeros of an unsigned fract. | |
static int | countlsulr (u032 f) |
This function counts the number of leading zeros of an unsigned long fract. | |
static int | countlsuhk (u88 f) |
This function counts the number of leading zeros of an unsigned short accum. | |
static int | countlsuk (u1616 f) |
This function counts the number of leading zeros of an unsigned accum. | |
static int | countlsulk (u3232 f) |
This function counts the number of leading zeros of an unsigned long accum. | |
Additions to the stdfix.h file to support full Draft ISO/IEC standards compliance.
#define min | ( | a, | |
b | |||
) | (((a)<(b)) ? (a) : (b)) |
Returns the minimum of two arguments.
[in] | a | First argument |
[in] | b | Second argument |
a
and b
. #define __stdfix_max | ( | a, | |
b | |||
) | (((a)<(b)) ? (b) : (a)) |
Returns the maximum of two arguments.
[in] | a | First argument |
[in] | b | Second argument |
a
and b
. #define __stdfix_use | ( | a | ) | do {} while ((a)!=(a)) |
A macro definition which pretends to use variable a
.
[in] | a | First argument (must not be floating point!) |
#define __stdfix_abs | ( | a | ) | (((a)<0) ? -(a) : (a)) |
Returns the absolute value of its argument.
[in] | a | First argument. |
a
. Returns the most significant 32-bits of a 64-bit argument.
[in] | x | A 64-bit value. |
x
. Returns the least significant 32-bits of a 64-bit argument.
[in] | x | A 64-bit value. |
x
. #define absfx | ( | f | ) |
This macro provides type-generic access to the absolute value functions.
[in] | f | A signed fixed-point value. |
#define roundfx | ( | f, | |
n | |||
) |
This macro provides type-generic access to the rounding functions.
[in] | f | A fixed-point value. |
[in] | n | The number of bits to be rounded off. |
#define countlsfx | ( | f | ) |
This macro provides type-generic access to the functions for counting leading sign-bits.
[in] | f | A fixed-point value. |
void __stdfix_64x64_128 | ( | uint64_t * | hi, |
uint64_t * | lo, | ||
uint64_t | x, | ||
uint64_t | y | ||
) |
Multiplies two 64-bit unsigned integers returning a 128-bit result in hi
and lo
.
[out] | hi | The high 64 bits of the product |
[out] | lo | The low 64 bits of the product |
[in] | x | First argument |
[in] | y | Second argument |
Converts a short fract into an integer.
[in] | f | A short fract |
Converts a fract into an integer.
[in] | f | A fract |
Converts a long fract into an integer.
[in] | f | A long fract |
Converts a short accum into an integer.
[in] | f | A short accum |
Converts an accum into an integer.
[in] | f | An accum |
Converts a long accum into an integer.
[in] | f | A long accum |
|
inlinestatic |
Converts an unsigned short fract into an integer.
[in] | f | An unsigned short fract |
Converts an unsigned fract into an integer.
[in] | f | An unsigned fract |
|
inlinestatic |
Converts an unsigned long fract into an integer.
[in] | f | An unsigned long fract |
|
inlinestatic |
Converts an unsigned short accum into an integer.
[in] | f | An unsigned short accum |
Converts an unsigned accum into an integer.
[in] | f | An unsigned accum |
|
inlinestatic |
Converts an unsigned long accum into an integer.
[in] | f | An unsigned long accum |
Converts a signed integer into a signed short fract.
[in] | n | A signed integer |
n
. Converts a signed integer into a signed fract.
[in] | n | A signed integer |
n
. Converts a signed integer into a signed long fract.
[in] | n | A signed integer |
n
. Converts a signed integer into a signed short accum.
[in] | n | A signed integer |
n
. Converts a signed integer into a signed accum.
[in] | n | A signed integer |
n
. Converts a signed integer into a signed long accum.
[in] | n | A signed integer |
n
.
|
inlinestatic |
Converts an unsigned integer into an unsigned short fract.
[in] | n | An unsigned integer |
n
. Converts an unsigned integer into an unsigned fract.
[in] | n | An unsigned integer |
n
.
|
inlinestatic |
Converts an unsigned integer into an unsigned long fract.
[in] | n | An unsigned integer |
n
.
|
inlinestatic |
Converts an unsigned integer into an unsigned short accum.
[in] | n | An unsigned integer |
n
. Converts an unsigned integer into an unsigned accum.
[in] | n | An unsigned integer |
n
.
|
inlinestatic |
Converts an unsigned integer into an unsigned long accum.
[in] | n | An unsigned integer |
n
.
|
inlinestatic |
Saturates an integer to 8 bits.
[in] | x | An integer |
|
inlinestatic |
Saturates an integer to 16 bits.
[in] | x | An integer |
|
inlinestatic |
Saturates a 64-bit integer to 32-bits.
[in] | x | An integer |
|
inlinestatic |
Saturates an integer to 16 bits.
[in] | x | An integer |
|
inlinestatic |
Saturates a 64-bit integer to 32-bits.
[in] | x | An integer |
|
inlinestatic |
Saturates an unsigned integer to 8 bits.
[in] | x | An unsigned integer |
|
inlinestatic |
Saturates an unsigned integer to 16 bits.
[in] | x | An unsigned integer |
|
inlinestatic |
Saturates an unsigned 64-bit integer to 32 bits.
[in] | x | An unsigned integer |
|
inlinestatic |
Saturates an unsigned integer to 16 bits.
[in] | x | An unsigned integer |
|
inlinestatic |
Saturates an unsigned 64-bit integer to 32 bits.
[in] | x | An unsigned integer |
Saturated addition of the underlying integer representations.
[in] | x | An 8-bit integer |
[in] | y | An 8-bit integer |
Saturated subtraction of the underlying integer representations.
[in] | x | An 8-bit integer |
[in] | y | An 8-bit integer |
|
inlinestatic |
Saturated negation of the underlying integer representations.
[in] | x | An 8-bit integer |
|
inlinestatic |
Saturated addition of the underlying integer representations.
[in] | x | A 16-bit integer |
[in] | y | A 16-bit integer |
|
inlinestatic |
Saturated subtraction of the underlying integer representations.
[in] | x | A 16-bit integer |
[in] | y | A 16-bit integer |
|
inlinestatic |
Saturated negation of the underlying integer representations.
[in] | x | A 16-bit integer |
|
inlinestatic |
Saturated addition of the underlying integer representations.
[in] | x | A 32-bit integer |
[in] | y | A 32-bit integer |
|
inlinestatic |
Saturated subtraction of the underlying integer representations.
[in] | x | A 32-bit integer |
[in] | y | A 32-bit integer |
|
inlinestatic |
Saturated negation of the underlying integer representations.
[in] | x | A 32-bit integer |
|
inlinestatic |
Saturated addition of the underlying integer representations.
[in] | x | A 16-bit integer |
[in] | y | A 16-bit integer |
|
inlinestatic |
Saturated subtraction of the underlying integer representations.
[in] | x | A 16-bit integer |
[in] | y | A 16-bit integer |
|
inlinestatic |
Saturated negation of the underlying integer representations.
[in] | x | A 16-bit integer |
|
inlinestatic |
Saturated addition of the underlying integer representations.
[in] | x | A 32-bit integer |
[in] | y | A 32-bit integer |
|
inlinestatic |
Saturated subtraction of the underlying integer representations.
[in] | x | A 32-bit integer |
[in] | y | A 32-bit integer |
|
inlinestatic |
Saturated negation of the underlying integer representations.
[in] | x | A 32-bit integer |
int64_t __stdfix_sadd_lk | ( | int64_t | x, |
int64_t | y | ||
) |
Saturated addition of the underlying integer representations.
[in] | x | A 64-bit integer |
[in] | y | A 64-bit integer |
int64_t __stdfix_ssub_lk | ( | int64_t | x, |
int64_t | y | ||
) |
Saturated subtraction of the underlying integer representations.
[in] | x | A 64-bit integer |
[in] | y | A 64-bit integer |
int64_t __stdfix_sneg_lk | ( | int64_t | x | ) |
Saturated negation of the underlying integer representations.
[in] | x | A 64-bit integer |
|
inlinestatic |
Saturated multiplication of the underlying integer representations.
[in] | x | A 32-bit integer representing of a short fract. |
[in] | y | A 32-bit integer representing of a short fract. |
|
inlinestatic |
Saturated multiplication of the underlying integer representations.
[in] | x | A 32-bit integer representing of a fract. |
[in] | y | A 32-bit integer representing of a fract. |
|
inlinestatic |
Saturated multiplication of the underlying integer representations.
[in] | x | A 32-bit integer representing of a long fract. |
[in] | y | A 32-bit integer representing of a long fract. |
|
inlinestatic |
Saturated multiplication of the underlying integer representations.
[in] | x | A 32-bit integer representing of a short accum. |
[in] | y | A 32-bit integer representing of a short accum. |
|
inlinestatic |
Saturated multiplication of the underlying integer representations.
[in] | x | A 32-bit integer representing of an accum. |
[in] | y | A 32-bit integer representing of an accum. |
int64_t __stdfix_smul_lk | ( | int64_t | x, |
int64_t | y | ||
) |
Saturated multiplication of the underlying integer representations.
[in] | x | A 64-bit integer representing of a long accum. |
[in] | y | A 64-bit integer representing of a long accum. |
|
inlinestatic |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
|
inlinestatic |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer |
[in] | y | A 32-bit unsigned integer |
uint64_t __stdfix_sadd_ulk | ( | uint64_t | x, |
uint64_t | y | ||
) |
Saturated addition of the underlying unsigned integer representations.
[in] | x | A 64-bit unsigned integer |
[in] | y | A 64-bit unsigned integer |
uint64_t __stdfix_ssub_ulk | ( | uint64_t | x, |
uint64_t | y | ||
) |
Saturated subtraction of the underlying unsigned integer representations.
[in] | x | A 64-bit unsigned integer |
[in] | y | A 64-bit unsigned integer |
|
inlinestatic |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer representing of an unsigned short fract. |
[in] | y | A 32-bit unsigned integer representing of an unsigned short fract. |
|
inlinestatic |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer representing of an unsigned fract. |
[in] | y | A 32-bit unsigned integer representing of an unsigned fract. |
|
inlinestatic |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer representing of an unsigned long fract. |
[in] | y | A 32-bit unsigned integer representing of an unsigned long fract. |
|
inlinestatic |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer representing of an unsigned short accum. |
[in] | y | A 32-bit unsigned integer representing of an unsigned short accum. |
|
inlinestatic |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 32-bit unsigned integer representing of an unsigned accum. |
[in] | y | A 32-bit unsigned integer representing of an unsigned accum. |
uint64_t __stdfix_smul_ulk | ( | uint64_t | x, |
uint64_t | y | ||
) |
Saturated multiplication of the underlying unsigned integer representations.
[in] | x | A 64-bit unsigned integer representing of an unsigned long accum. |
[in] | y | A 64-bit unsigned integer representing of an unsigned long accum. |
|
inlinestatic |
Multiplies an integer by a fract giving an integer answer.
[in] | n | An integer |
[in] | x | An s0.15 fract |
|
inlinestatic |
Multiplies a long integer by a long fract giving an integer answer.
[in] | n | A long integer |
[in] | x | An s0.31 fract |
|
inlinestatic |
Multiplies an integer by an accum giving an integer answer.
[in] | n | An integer |
[in] | x | An s16.15 accum |
|
inlinestatic |
Multiplies a long integer by a long accum giving a long integer answer.
[in] | n | A long integer |
[in] | x | An s32.31 accum |
|
inlinestatic |
Divides an integer by a fract giving an integer answer.
[in] | n | An integer |
[in] | x | An s0.15 fract |
|
inlinestatic |
Divides a long integer by a long fract giving a long integer answer.
[in] | n | A long integer |
[in] | x | An s0.31 fract |
|
inlinestatic |
Divides an integer by an accum giving an integer answer.
[in] | n | An integer |
[in] | x | An s16.15 accum |
|
inlinestatic |
Divides an integer by a long accum giving a long integer answer.
[in] | n | A long integer |
[in] | x | An s32.31 accum |
|
inlinestatic |
Divides two integers giving a fract answer.
[in] | i | An integer |
[in] | j | An integer |
|
inlinestatic |
Divides two integers giving a long fract answer.
[in] | i | An integer |
[in] | j | An integer |
|
inlinestatic |
Divides two integers giving an accum answer.
[in] | i | An integer |
[in] | j | An integer |
|
inlinestatic |
Divides two integers giving a long accum answer.
[in] | i | An integer |
[in] | j | An integer |
Divides two fracts giving an integer answer.
[in] | x | A fract |
[in] | y | A fract |
Divides two long fracts giving a long integer answer.
[in] | x | A long fract |
[in] | y | A long fract |
Divides two accums giving an integer answer.
[in] | x | An accum |
[in] | y | An accum |
Divides two long accums giving a long integer answer.
[in] | x | A long accum |
[in] | y | A long accum |
|
inlinestatic |
Multiplies an unsigned integer by an unsigned fract giving an unsigned integer answer.
[in] | n | An unsigned integer |
[in] | x | An unsigned fract |
|
inlinestatic |
Multiplies an unsigned long integer by an unsigned long fract giving an unsigned integer answer.
[in] | n | An unsigned long integer |
[in] | x | An unsigned long fract |
|
inlinestatic |
Multiplies an unsigned integer by an unsigned accum giving an unsigned integer answer.
[in] | n | An unsigned integer |
[in] | x | An unsigned accum |
|
inlinestatic |
Multiplies an unsigned long integer by an unsigned long accum giving an unsigned long integer answer.
[in] | n | An unsigned long integer |
[in] | x | An unsigned long accum |
|
inlinestatic |
Divides an unsigned integer by an unsigned fract giving an unsigned integer answer.
[in] | n | An unsigned integer |
[in] | x | An unsigned fract |
|
inlinestatic |
Divides a long unsigned integer by a long unsigned fract giving an unsigned integer answer.
[in] | n | A long unsigned integer |
[in] | x | A long unsigned fract |
|
inlinestatic |
Divides an unsigned integer by an unsigned accum giving an unsigned integer answer.
[in] | n | An unsigned integer |
[in] | x | An unsigned accum |
|
inlinestatic |
Divides a long unsigned integer by a long unsigned accum giving an unsigned integer answer.
[in] | n | A long unsigned integer |
[in] | x | A long unsigned accum |
|
inlinestatic |
Divides two unsigned integers giving an unsigned fract answer.
[in] | i | An unsigned integer |
[in] | j | An unsigned integer |
|
inlinestatic |
Divides two unsigned long integers giving an unsigned long fract answer.
[in] | i | An unsigned long integer |
[in] | j | An unsigned long integer |
|
inlinestatic |
Divides two unsigned integers giving an unsigned accum answer.
[in] | i | An unsigned integer |
[in] | j | An unsigned integer |
|
inlinestatic |
Divides two unsigned long integers giving an unsigned long accum answer.
[in] | i | An unsigned long integer |
[in] | j | An unsigned long integer |
Divides two unsigned fracts giving an unsigned integer answer.
[in] | x | An unsigned fract |
[in] | y | An unsigned fract |
Divides two unsigned long fracts giving an unsigned long integer answer.
[in] | x | An unsigned long fract |
[in] | y | An unsigned long fract |
Divides two unsigned accums giving an unsigned integer answer.
[in] | x | An unsigned accum |
[in] | y | An unsigned accum |
Divides two unsigned long accums giving an unsigned long integer answer.
[in] | x | An unsigned long accum |
[in] | y | An unsigned long accum |
This function returns the absolute value of a short fract.
[in] | f | A short fract. |
This function returns the absolute value of a fract.
[in] | f | A fract. |
This function returns the absolute value of a long fract.
[in] | f | A long fract. |
This function returns the absolute value of a short accum.
[in] | f | A short accum. |
This function returns the absolute value of an accum.
[in] | f | An accum. |
This function returns the absolute value of a long accum.
[in] | f | A long accum. |
|
inlinestatic |
This function rounds the input unsigned 8-bit integer to a number of bits, returning an 8-bit integer.
[in] | x | An 8-bit number to be rounded. |
[in] | n | An int. |
f
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input unsigned 16-bit integer to a number of bits, returning a 16-bit integer.
[in] | x | A 16-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input unsigned 32-bit integer to a number of bits, returning a 32-bit integer.
[in] | x | A 32-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input unsigned 64-bit integer to a number of bits, returning a 64-bit integer.
[in] | x | A 64-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input signed 8-bit integer to a number of bits, returning an 8-bit integer.
[in] | x | An 8-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input signed 16-bit integer to a number of bits, returning a 16-bit integer.
[in] | x | A 16-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input signed 32-bit integer to a number of bits, returning a 32-bit integer.
[in] | x | A 32-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits.
|
inlinestatic |
This function rounds the input signed 64-bit integer to a number of bits, returning a 64-bit integer.
[in] | x | A 64-bit number to be rounded. |
[in] | n | An int. |
x
rounded to the nearest n bits. This function rounds the input short fract to a number of bits, returning a short fract.
[in] | f | A short fract. |
[in] | n | An int. |
This function rounds the input fract to a number of bits, returning a fract.
[in] | f | A fract. |
[in] | n | An int. |
This function rounds the input long fract to a number of bits, returning a long fract.
[in] | f | A long fract. |
[in] | n | An int. |
This function rounds the input short accum to a number of bits, returning a short accum.
[in] | f | A short accum. |
[in] | n | An int. |
This function rounds the input accum to a number of bits, returning an accum.
[in] | f | An accum. |
[in] | n | An int. |
This function rounds the input long accum to a number of bits, returning a long accum.
[in] | f | A long accum. |
[in] | n | An int. |
This function rounds the input unsigned short fract to a number of bits, returning an unsigned short fract.
[in] | f | An unsigned short fract. |
[in] | n | An int. |
This function rounds the input unsigned fract to a number of bits, returning an unsigned fract.
[in] | f | An unsigned fract. |
[in] | n | An int. |
This function rounds the input unsigned long fract to a number of bits, returning an unsigned long fract.
[in] | f | An unsigned long fract. |
[in] | n | An int. |
This function rounds the input unsigned short accum to a number of bits, returning an unsigned short accum.
[in] | f | An unsigned short accum. |
[in] | n | An int. |
This function rounds the input unsigned accum to a number of bits, returning an unsigned accum.
[in] | f | An unsigned accum. |
[in] | n | An int. |
This function rounds the input unsigned long accum to a number of bits, returning an unsigned long accum.
[in] | f | An unsigned long accum. |
[in] | n | An int. |
|
inlinestatic |
This function counts the number of leading sign-bits of a short fract.
[in] | f | A short fract. |
|
inlinestatic |
This function counts the number of leading sign-bits of a fract.
[in] | f | A fract. |
|
inlinestatic |
This function counts the number of leading sign-bits of a long fract.
[in] | f | A long fract. |
|
inlinestatic |
This function counts the number of leading sign-bits of a short accum.
[in] | f | A short accum. |
|
inlinestatic |
This function counts the number of leading sign-bits of an accum.
[in] | f | An accum. |
|
inlinestatic |
This function counts the number of leading sign-bits of a long accum.
[in] | f | A long accum. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned short fract.
[in] | f | An unsigned short fract. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned fract.
[in] | f | An unsigned fract. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned long fract.
[in] | f | An unsigned long fract. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned short accum.
[in] | f | An unsigned short accum. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned accum.
[in] | f | An unsigned accum. |
|
inlinestatic |
This function counts the number of leading zeros of an unsigned long accum.
[in] | f | An unsigned long accum. |