Project Ne10
An open, optimized software library for the ARM architecture.
Macros
NE10_macros.h File Reference

Go to the source code of this file.

Macros

#define NE10_PI   (ne10_float32_t)(3.1415926535897932384626433832795)
 NE10 defines a number of macros for use in its function signatures. More...
 
#define NE10_MALLOC   malloc
 
#define NE10_FREE(p)
 
#define NE10_MIN(a, b)   ((a)>(b)?(b):(a))
 
#define NE10_MAX(a, b)   ((a)<(b)?(b):(a))
 
#define NE10_BYTE_ALIGNMENT(address, alignment)
 
#define NE10_F2I16_MAX   32767
 
#define NE10_F2I16_SHIFT   15
 
#define NE10_F2I16_SAMPPROD   ne10_int32_t
 
#define NE10_F2I16_OP(x)   (ne10_int16_t)((x)*NE10_F2I16_MAX + 0.5f)
 
#define NE10_F2I16_SROUND(x)   (ne10_int16_t)((((x)<<1)+(1<<NE10_F2I16_SHIFT))>>16)
 
#define NE10_F2I16_SMUL(a, b)   ((NE10_F2I16_SAMPPROD)(a)*(b))
 
#define NE10_F2I16_FIXDIV(c, div)
 
#define NE10_F2I32_MAX   2147483647
 
#define NE10_F2I32_SHIFT   31
 
#define NE10_F2I32_SAMPPROD   ne10_int64_t
 
#define NE10_F2I32_OP(x)   (ne10_int32_t)((x)*NE10_F2I32_MAX + 0.5f)
 
#define NE10_F2I32_SROUND(x)   (ne10_int32_t) ((x)>>NE10_F2I32_SHIFT)
 
#define NE10_F2I32_SMUL(a, b)   ((NE10_F2I32_SAMPPROD)(a)*(b))
 
#define NE10_F2I32_FIXDIV(c, div)
 

Macro Definition Documentation

#define NE10_BYTE_ALIGNMENT (   address,
  alignment 
)
Value:
do { \
(address) = (((address) + ((alignment) - 1)) & ~ ((alignment) - 1)); \
}while (0)

Definition at line 63 of file NE10_macros.h.

#define NE10_F2I16_FIXDIV (   c,
  div 
)
Value:
do { ((c).r) = ( ( ((c).r)/div) ); \
((c).i) = ( ( ((c).i)/div) ); }while (0)

Definition at line 77 of file NE10_macros.h.

#define NE10_F2I16_MAX   32767

Definition at line 71 of file NE10_macros.h.

#define NE10_F2I16_OP (   x)    (ne10_int16_t)((x)*NE10_F2I16_MAX + 0.5f)

Definition at line 74 of file NE10_macros.h.

#define NE10_F2I16_SAMPPROD   ne10_int32_t

Definition at line 73 of file NE10_macros.h.

#define NE10_F2I16_SHIFT   15

Definition at line 72 of file NE10_macros.h.

#define NE10_F2I16_SMUL (   a,
 
)    ((NE10_F2I16_SAMPPROD)(a)*(b))

Definition at line 76 of file NE10_macros.h.

#define NE10_F2I16_SROUND (   x)    (ne10_int16_t)((((x)<<1)+(1<<NE10_F2I16_SHIFT))>>16)

Definition at line 75 of file NE10_macros.h.

#define NE10_F2I32_FIXDIV (   c,
  div 
)
Value:
do { ((c).r) = ( ( ((c).r)/div) ); \
((c).i) = ( ( ((c).i)/div) ); }while (0)

Definition at line 87 of file NE10_macros.h.

#define NE10_F2I32_MAX   2147483647

Definition at line 81 of file NE10_macros.h.

#define NE10_F2I32_OP (   x)    (ne10_int32_t)((x)*NE10_F2I32_MAX + 0.5f)

Definition at line 84 of file NE10_macros.h.

#define NE10_F2I32_SAMPPROD   ne10_int64_t

Definition at line 83 of file NE10_macros.h.

#define NE10_F2I32_SHIFT   31

Definition at line 82 of file NE10_macros.h.

#define NE10_F2I32_SMUL (   a,
 
)    ((NE10_F2I32_SAMPPROD)(a)*(b))

Definition at line 86 of file NE10_macros.h.

#define NE10_F2I32_SROUND (   x)    (ne10_int32_t) ((x)>>NE10_F2I32_SHIFT)

Definition at line 85 of file NE10_macros.h.

#define NE10_FREE (   p)
Value:
do { \
free(p); \
p = NULL; \
}while(0)

Definition at line 54 of file NE10_macros.h.

#define NE10_MALLOC   malloc

Definition at line 53 of file NE10_macros.h.

#define NE10_MAX (   a,
 
)    ((a)<(b)?(b):(a))

Definition at line 61 of file NE10_macros.h.

#define NE10_MIN (   a,
 
)    ((a)>(b)?(b):(a))

Definition at line 60 of file NE10_macros.h.

#define NE10_PI   (ne10_float32_t)(3.1415926535897932384626433832795)

NE10 defines a number of macros for use in its function signatures.

The macros are defined within this header file.

Definition at line 47 of file NE10_macros.h.