API Reference Manual  1.45.0
ODP STD

API Description

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 int odp_bool_t
 Use odp boolean type to have it well-defined and known size, regardless which compiler is used as this facilities interoperability between e.g. More...
 
typedef uint32_t odp_percent_t
 Percentage type Use odp_percent_t for specifying fields that are percentages. 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...
 

Typedef Documentation

◆ odp_bool_t

Use odp boolean type to have it well-defined and known size, regardless which compiler is used as this facilities interoperability between e.g.

different compilers.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

Definition at line 25 of file api/abi-default/std_types.h.

◆ odp_percent_t

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 42 of file api/spec/std_types.h.

◆ 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.

◆ 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.

Enumeration Type Documentation

◆ 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 103 of file api/spec/std_types.h.

Function Documentation

◆ odp_memcpy()

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.

Parameters
dstPointer to destination memory block
srcPointer to source memory block
numNumber of bytes to copy
Returns
'dst' address

◆ odp_memset()

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'.

Parameters
ptrPointer to the memory block
valueValue to be set
numNumber of bytes to set
Returns
'ptr' address

◆ odp_memcmp()

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'.

Parameters
ptr1Pointer to a memory block
ptr2Pointer to a memory block
numNumber of bytes to compare
Return values
0when the contents of memory blocks match
<0when the contents of memory blocks do not match, and block 'ptr1' is less than block 'ptr2'
>0when the contents of memory blocks do not match, and block 'ptr1' is greater than block 'ptr2'

◆ odp_fract_u64_to_dbl()

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.

Parameters
fractPointer to a fractional number
Returns
Value of the fractional number as double
Examples
odp_timer_accuracy.c.