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>
45 #include <sys/ioctl.h>
50 #include <sys/ioctl.h>
51 #include <mach-o/dyld.h>
52 #include <mach/mach.h>
57 #include <sys/ioctl.h>
60 typedef void *OCL_LIB
;
63 typedef void *ADL_LIB
;
64 typedef void *NVAPI_LIB
;
65 typedef void *NVML_LIB
;
66 typedef void *XNVCTRL_LIB
;
75 #define WIN32_LEAN_AND_MEAN
83 typedef UINT8
uint8_t;
84 typedef UINT16
uint16_t;
85 typedef UINT32
uint32_t;
86 typedef UINT64
uint64_t;
88 typedef INT16
int16_t;
89 typedef INT32
int32_t;
90 typedef INT64
int64_t;
93 typedef UINT64
uint64_t;
95 typedef HINSTANCE OCL_LIB
;
98 typedef HINSTANCE ADL_LIB
;
99 typedef HINSTANCE NVAPI_LIB
;
100 typedef HINSTANCE NVML_LIB
;
101 typedef HINSTANCE XNVCTRL_LIB
;
104 #define mkdir(name,mode) mkdir (name)
109 typedef uint16_t u16
;
110 typedef uint32_t u32
;
111 typedef uint64_t u64
;
113 typedef uint32_t uint
; // we need to get rid of this sooner or later, for consistency
115 #define EXEC_CACHE 128
117 #define SPEED_CACHE 128
118 #define SPEED_MAXAGE 4096
120 #define HCBUFSIZ 0x50000 // general large space buffer size in case the size is unknown at compile-time
122 #define EXPECTED_ITERATIONS 10000
128 int log_out_nn (FILE *fp
, const char *fmt
, ...);
129 int log_info_nn (const char *fmt
, ...);
130 int log_error_nn (const char *fmt
, ...);
132 int log_out (FILE *fp
, const char *fmt
, ...);
133 int log_info (const char *fmt
, ...);
134 int log_error (const char *fmt
, ...);
136 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
137 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
139 #define CEIL(a) ((a - (int) (a)) > 0 ? a + 1 : a)