2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * magnum <john.magnum@hushmail.com>
13 #define _FILE_OFFSET_BITS 64
14 #define _CRT_SECURE_NO_WARNINGS
31 #include <sys/types.h>
38 #include <semaphore.h>
49 #include <sys/ioctl.h>
50 #include <mach-o/dyld.h>
51 #include <mach/mach.h>
54 typedef void *OCL_LIB
;
57 typedef void *ADL_LIB
;
58 typedef void *NVAPI_LIB
;
59 typedef void *NVML_LIB
;
60 typedef void *XNVCTRL_LIB
;
69 #define WIN32_LEAN_AND_MEAN
77 typedef UINT8
uint8_t;
78 typedef UINT16
uint16_t;
79 typedef UINT32
uint32_t;
80 typedef UINT64
uint64_t;
82 typedef INT16
int16_t;
83 typedef INT32
int32_t;
84 typedef INT64
int64_t;
87 typedef UINT64
uint64_t;
89 typedef HINSTANCE OCL_LIB
;
92 typedef HINSTANCE ADL_LIB
;
93 typedef HINSTANCE NVAPI_LIB
;
94 typedef HINSTANCE NVML_LIB
;
95 typedef HINSTANCE XNVCTRL_LIB
;
98 #define mkdir(name,mode) mkdir (name)
103 typedef uint16_t u16
;
104 typedef uint32_t u32
;
105 typedef uint64_t u64
;
107 typedef uint32_t uint
; // we need to get rid of this sooner or later, for consistency
109 #define EXEC_CACHE 128
111 #define SPEED_CACHE 128
112 #define SPEED_MAXAGE 4096
114 #define HCBUFSIZ 0x50000 // general large space buffer size in case the size is unknown at compile-time
116 #define EXPECTED_ITERATIONS 10000
122 int log_out_nn (FILE *fp
, const char *fmt
, ...);
123 int log_info_nn (const char *fmt
, ...);
124 int log_error_nn (const char *fmt
, ...);
126 int log_out (FILE *fp
, const char *fmt
, ...);
127 int log_info (const char *fmt
, ...);
128 int log_error (const char *fmt
, ...);
130 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
131 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
133 #define CEIL(a) ((a - (int) (a)) > 0 ? a + 1 : a)