/* $Id: globaldefs.h 1098 2006-08-31 07:38:52Z olau $ */

#ifndef __GLOBALDEFS_H_
#define __GLOBALDEFS_H_

#define f(x)                 (4.0/(1.0+(x)*(x)))
#define PI                   (3.14159265358979323846264338327950288419716939937510)
#define DEFAULT_ITERATIONS   (100000000)

#ifdef WIN32
#include <windows.h>
#endif /* WIN32 */

#ifndef WIN32
typedef unsigned char BYTE;
typedef int BOOL;
#endif

#ifndef TRUE
#define TRUE  (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif

#define CACHE_LINE_SIZE      128

#if defined(WIN32) && !defined(BCC32)
#define CACHE_ALIGN           __declspec(align(CACHE_LINE_SIZE))
#else
#define CACHE_ALIGN           __attribute__((aligned (CACHE_LINE_SIZE), packed))
#endif /* WIN32 && BCC32 */

#ifndef max
#define max(a, b) (((a) > (b))? (a) : (b))
#endif /* max */

#endif /* __GLOBALDEFS_H_ */
