(file) Return to foundation.h CVS log (file) (dir) Up to [Development] / JSOC / base

File: [Development] / JSOC / base / foundation.h (download)
Revision: 1.3, Tue Nov 25 18:32:28 2008 UTC (14 years ago) by kehcheng
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_DRMSLATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-4, Ver_8-3, Ver_8-2, Ver_8-12, Ver_8-11, Ver_8-10, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2, Ver_6-1, Ver_6-0, Ver_5-9, Ver_5-8, Ver_5-7, Ver_5-6, Ver_5-5, Ver_5-3, Ver_5-2, Ver_5-14, Ver_5-13, Ver_5-12, Ver_5-11, Ver_5-10, Ver_5-1, Ver_5-0, NetDRMS_Ver_LATEST, NetDRMS_Ver_9-9, NetDRMS_Ver_9-5, NetDRMS_Ver_9-41, NetDRMS_Ver_9-4, NetDRMS_Ver_9-3, NetDRMS_Ver_9-2, NetDRMS_Ver_9-1, NetDRMS_Ver_9-0, NetDRMS_Ver_8-8, NetDRMS_Ver_8-7, NetDRMS_Ver_8-6, NetDRMS_Ver_8-5, NetDRMS_Ver_8-4, NetDRMS_Ver_8-3, NetDRMS_Ver_8-2, NetDRMS_Ver_8-12, NetDRMS_Ver_8-11, NetDRMS_Ver_8-10, NetDRMS_Ver_8-1, NetDRMS_Ver_8-0, NetDRMS_Ver_7-1, NetDRMS_Ver_7-0, NetDRMS_Ver_6-4, NetDRMS_Ver_6-3, NetDRMS_Ver_6-2, NetDRMS_Ver_6-1, NetDRMS_Ver_6-0, NetDRMS_Ver_2-7, NetDRMS_Ver_2-6, NetDRMS_Ver_2-5, NetDRMS_Ver_2-4, NetDRMS_Ver_2-3, NetDRMS_Ver_2-2, NetDRMS_Ver_2-1, NetDRMS_Ver_2-0b1, NetDRMS_Ver_2-0b, NetDRMS_Ver_2-0a2, NetDRMS_Ver_2-0a1, NetDRMS_Ver_2-0a, NetDRMS_Ver_2-0, HEAD
Changes since 1.2: +12 -0 lines
added F_INF, F_NEG_INF, D_INF, D_NEG_INF

#ifndef _FOUNDATION_H
#define _FOUNDATION_H

#ifdef __attribute__used__
static union { uint32_t rep; float val; } __f_inf__ __attribute_used__ = {0x7f800000};
static union { uint32_t rep; float val; } __f_neg_inf__ __attribute_used__ = {0xff800000};
static union { uint32_t rep; float val; } __f_nan__ __attribute_used__ = {0xffc00000};
static union { uint64_t rep; double val; } __d_inf__ __attribute_used__ = {0x7ff0000000000000};
static union { uint64_t rep; double val; } __d_neg_inf__ __attribute_used__ = {0xfff0000000000000};
static union { uint64_t rep; double val; } __d_nan__ __attribute_used__ = {0xfff8000000000000};
#else 
static union { uint32_t rep; float val; } __f_inf__ __attribute__((used)) = {0x7f800000};
static union { uint32_t rep; float val; } __f_neg_inf__ __attribute__((used)) = {0xff800000};
static union { uint32_t rep; float val; } __f_nan__ __attribute__((used)) = {0xffc00000};
static union { uint64_t rep; double val; } __d_inf__ __attribute__((used)) = {0x7ff0000000000000};
static union { uint64_t rep; double val; } __d_neg_inf__ __attribute__((used)) = {0xfff0000000000000};
static union { uint64_t rep; double val; } __d_nan__ __attribute__((used)) = {0xfff8000000000000};
#endif /* __attribute__used__ */
#define F_INF (__f_inf__.val)
#define F_NEG_INF (__f_neg_inf__.val)
#define F_NAN (__f_nan__.val)
#define D_INF (__d_inf__.val)
#define D_NEG_INF (__d_neg_inf__.val)
#define D_NAN (__d_nan__.val)

#endif // _FOUNDATION_H

Karen Tian
Powered by
ViewCVS 0.9.4