ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.h
(Generate patch)

Comparing libecb/ecb.h (file contents):
Revision 1.148 by root, Fri Oct 24 04:50:13 2014 UTC vs.
Revision 1.150 by root, Thu Oct 30 07:21:42 2014 UTC

278 #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE 278 #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
279#endif 279#endif
280 280
281/*****************************************************************************/ 281/*****************************************************************************/
282 282
283#if __cplusplus 283#if ECB_CPP
284 #define ecb_inline static inline 284 #define ecb_inline static inline
285#elif ECB_GCC_VERSION(2,5) 285#elif ECB_GCC_VERSION(2,5)
286 #define ecb_inline static __inline__ 286 #define ecb_inline static __inline__
287#elif ECB_C99 287#elif ECB_C99
288 #define ecb_inline static inline 288 #define ecb_inline static inline
343#elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8) 343#elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8)
344 #define ecb_decltype(x) __typeof__ (x) 344 #define ecb_decltype(x) __typeof__ (x)
345#endif 345#endif
346 346
347#if _MSC_VER >= 1300 347#if _MSC_VER >= 1300
348 #define ecb_deprecated __declspec(deprecated) 348 #define ecb_deprecated __declspec (deprecated)
349#else 349#else
350 #define ecb_deprecated ecb_attribute ((__deprecated__)) 350 #define ecb_deprecated ecb_attribute ((__deprecated__))
351#endif 351#endif
352 352
353#define ecb_noinline ecb_attribute ((__noinline__)) 353#define ecb_noinline ecb_attribute ((__noinline__))
600 #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0)) 600 #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0))
601#else 601#else
602 #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) 602 #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n)))
603#endif 603#endif
604 604
605#if __cplusplus 605#if ECB_CPP
606 template<typename T> 606 template<typename T>
607 static inline T ecb_div_rd (T val, T div) 607 static inline T ecb_div_rd (T val, T div)
608 { 608 {
609 return val < 0 ? - ((-val + div - 1) / div) : (val ) / div; 609 return val < 0 ? - ((-val + div - 1) / div) : (val ) / div;
610 } 610 }
673 #endif 673 #endif
674 674
675 #if ECB_C99 || _XOPEN_VERSION >= 600 || _POSIX_VERSION >= 200112L 675 #if ECB_C99 || _XOPEN_VERSION >= 600 || _POSIX_VERSION >= 200112L
676 #define ecb_ldexpf(x,e) ldexpf ((x), (e)) 676 #define ecb_ldexpf(x,e) ldexpf ((x), (e))
677 #else 677 #else
678 #define ecb_ldexpf(x,e) (float) ldexp ((double)(x), (e)) 678 #define ecb_ldexpf(x,e) (float) ldexp ((x), (e))
679 #endif 679 #endif
680 680
681 /* converts an ieee half/binary16 to a float */ 681 /* converts an ieee half/binary16 to a float */
682 ecb_function_ float ecb_binary16_to_float (uint16_t x) ecb_const; 682 ecb_function_ float ecb_binary16_to_float (uint16_t x) ecb_const;
683 ecb_function_ float 683 ecb_function_ float

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines