API Reference Manual
1.46.0
|
Standard types and performance optimized versions of selected C library functions.
Data Structures | |
struct | odp_u128_s |
128-bit unsigned integer structure More... | |
struct | odp_fract_u64_t |
Unsigned 64 bit fractional number. More... | |
union | odp_feature_t |
Definition of ODP features. More... | |
Typedefs | |
typedef bool | odp_bool_t |
Boolean type. More... | |
typedef uint32_t | odp_percent_t |
Percentage type. More... | |
typedef uint16_t | odp_una_u16_t |
Unaligned uint16_t type. | |
typedef uint32_t | odp_una_u32_t |
Unaligned uint32_t type. | |
typedef uint64_t | odp_una_u64_t |
Unaligned uint64_t type. | |
typedef struct odp_u128_s | odp_u128_t |
128-bit unsigned integer structure | |
typedef struct odp_fract_u64_t | odp_fract_u64_t |
Unsigned 64 bit fractional number. More... | |
typedef enum odp_support_t | odp_support_t |
ODP support. More... | |
typedef union odp_feature_t | odp_feature_t |
Definition of ODP features. | |
Enumerations | |
enum | odp_support_t { ODP_SUPPORT_NO = 0 , ODP_SUPPORT_YES , ODP_SUPPORT_PREFERRED } |
ODP support. More... | |
Functions | |
void * | odp_memcpy (void *dst, const void *src, size_t num) |
Memcpy. More... | |
void * | odp_memset (void *ptr, int value, size_t num) |
Memset. More... | |
int | odp_memcmp (const void *ptr1, const void *ptr2, size_t num) |
Memcmp. More... | |
double | odp_fract_u64_to_dbl (const odp_fract_u64_t *fract) |
Convert fractional number (u64) to double. More... | |
Boolean type.
odp_bool_t type is provided for backward compatibility and is compliant with the C standard booleans. When assigning values to odp_bool_t variables, any non-zero value is considered true and zero is considered false. C standard 'true' and 'false' macros (C99) / predefined constants (C23) can be used with odp_bool_t variables.
Definition at line 25 of file api/abi-default/std_types.h.
typedef uint32_t odp_percent_t |
Percentage type.
Use odp_percent_t for specifying fields that are percentages. It is a fixed point integer whose units are expressed as one-hundredth of a percent. Hence 100% is represented as integer value 10000.
Definition at line 46 of file api/spec/std_types.h.
typedef struct odp_fract_u64_t odp_fract_u64_t |
Unsigned 64 bit fractional number.
The number is composed of integer and fraction parts. The fraction part is composed of two terms: numerator and denominator. Value of the number is sum of the integer and fraction parts: value = integer + numer/denom. When the fraction part is zero, the numerator is zero and the denominator may be zero.
typedef enum odp_support_t odp_support_t |
ODP support.
Support levels are specified in the relative order, where ODP_SUPPORT_NO is the lowest level. E.g. if the examined support level is greater than ODP_SUPPORT_NO, the feature is supported in some form.
enum odp_support_t |
ODP support.
Support levels are specified in the relative order, where ODP_SUPPORT_NO is the lowest level. E.g. if the examined support level is greater than ODP_SUPPORT_NO, the feature is supported in some form.
Enumerator | |
---|---|
ODP_SUPPORT_NO | Feature is not supported. |
ODP_SUPPORT_YES | Feature is supported. |
ODP_SUPPORT_PREFERRED | Feature is supported and preferred. |
Definition at line 111 of file api/spec/std_types.h.
void* odp_memcpy | ( | void * | dst, |
const void * | src, | ||
size_t | num | ||
) |
Memcpy.
ODP version of C library memcpy function. It copies 'num' bytes from source to destination address. Source and destination memory blocks must not overlap.
dst | Pointer to destination memory block |
src | Pointer to source memory block |
num | Number of bytes to copy |
void* odp_memset | ( | void * | ptr, |
int | value, | ||
size_t | num | ||
) |
Memset.
ODP version of C library memset function. It sets 'value' to first 'num' bytes of memory block pointed by 'ptr'.
ptr | Pointer to the memory block |
value | Value to be set |
num | Number of bytes to set |
int odp_memcmp | ( | const void * | ptr1, |
const void * | ptr2, | ||
size_t | num | ||
) |
Memcmp.
ODP version of C library memcmp function. It compares first 'num' bytes of memory blocks pointed by 'ptr1' and 'ptr2'.
ptr1 | Pointer to a memory block |
ptr2 | Pointer to a memory block |
num | Number of bytes to compare |
0 | when the contents of memory blocks match |
<0 | when the contents of memory blocks do not match, and block 'ptr1' is less than block 'ptr2' |
>0 | when the contents of memory blocks do not match, and block 'ptr1' is greater than block 'ptr2' |
double odp_fract_u64_to_dbl | ( | const odp_fract_u64_t * | fract | ) |
Convert fractional number (u64) to double.
Converts value of the unsigned 64 bit fractional number to a double-precision floating-point value.
fract | Pointer to a fractional number |